[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r7016: added some notes (bsockets/trunk)



Author: chiussi
Date: 2006-08-10 06:44:33 -0400 (Thu, 10 Aug 2006)
New Revision: 7016

Removed:
   bsockets/trunk/todo
Modified:
   bsockets/trunk/callback.c
   bsockets/trunk/notes
   bsockets/trunk/sync.c
   bsockets/trunk/test.c
Log:
added some notes



Modified: bsockets/trunk/callback.c
===================================================================
--- bsockets/trunk/callback.c	2006-08-10 09:30:25 UTC (rev 7015)
+++ bsockets/trunk/callback.c	2006-08-10 10:44:33 UTC (rev 7016)
@@ -18,7 +18,6 @@
 	//todo -- if write is incomplete, reiterate
 	//todo -- if error, raise exception
 
-
 }
 
 void CALLBACK callback_read(

Modified: bsockets/trunk/notes
===================================================================
--- bsockets/trunk/notes	2006-08-10 09:30:25 UTC (rev 7015)
+++ bsockets/trunk/notes	2006-08-10 10:44:33 UTC (rev 7016)
@@ -1,40 +1,42 @@
-- make sure atomic/release doesnt cause other calls to block when socket is in blocking mode
-- make sure we set all events before closing them, otherwise blocking calls might block indefinitely, also find a way to show that the socket as closed
-- always release mutex before closing them
-- atomic/release should ensure the socket in question is open and not closing.
-- you cannot free a socket unless you own the list otherwise we cannot guarantee that mutexes inside atomic() still exist
-- make sure that socket error is reset after everytime it is looked at
+Whats Left? (sorted by importance in non-increasing order)
+===========
 
+1. baccept() 
+   - blisten(): tells event manager to set desired socket to IS_READABLE when 
+     FD_ACCEPT happens
+   - baccept(): calls accept() with underlying socket as argument
+   
+2. brecv()
+   - when callback_write occurs, and the entire message has not been sent
+     reiterate
+   - figure out a way to test the above (ie, force WSARecv() to not send
+     entire message)
 
-- check how many open reads we can have
+3. Socket options/bfcntl()
+   - figure out how we are going to handle SO_LINGER 
+     (wait until socket is writable again?)
+   - should we forward options to the underlying socket if bsocket doesn't 
+     support/need them ?
+   
+3. Synchronization issues
+   - decide if we need a seperate mutex for wait objects. having global 
+     ownership is fine, but it slows everything down.
+   - ensure atomicity on wl_wait_many. problem because in time between
+     wait list monitor placement and wait list activation, anohter activation 
+     may occur, which is currently undefined behavior. To observe this, run 
+     test 25 with a large number of connections
 
-Ridiculous scenarios to think about
+4. Memory leaks
+   - There is a small memory leak observed when simply calling bsocket()/bclose(). Why?
+   - For each malloc, make sure there is a free. 
+     
+5. Complete remaining test ideas (todos in test.c).
 
-1. User is select()ing while close() is called on one of the waiting descriptors elsewhere
 
-Why this is bad:
-The user could be waiting for a read operation, 
+Misc
+----
+- Do we need to worry about UDP?
+- ""                     "" OOB Data?
+- OpenSSL uses SO_*TIMEO flags. What should we do about this? Winsock 
 
-Why it doesn't matter:
-This behavior is illegal (?)
 
-What will happen in bsock
-select will return -1, sockopt err will be set
-
-2. 
-
-
-
-sync issues
------------
-1. error array does not need syncronization because it may only be set by the 
-   event manager and read after event array indicates it is finished with socket
-
-2. we do not need to worry about closing a socket while there is a pending connect
-   which is queued. bconnect() will block until this is at least connected, so
-   any bclose() will block until the appropraite time.
-
-compatability issues
---------------------
-1. openssl uses SO_*TIMEO flags. winsock has no support for this option, and implementing
-   it would force us to rip apart the existing code. is there any nice way to code.

Modified: bsockets/trunk/sync.c
===================================================================
--- bsockets/trunk/sync.c	2006-08-10 09:30:25 UTC (rev 7015)
+++ bsockets/trunk/sync.c	2006-08-10 10:44:33 UTC (rev 7016)
@@ -142,10 +142,6 @@
 			M_INSERT(env->list_m);
 		}
 
-	//	if (type & AE_FREE) {
-	//		M_INSERT(env->free_m);
-	//	}
-
 		if (type & AE_WAIT) {
 			M_INSERT(env->wait_m);
 		}
@@ -175,11 +171,6 @@
 			M_INSERT(b->write_m);
 		}
 
-		//if (type & AS_ERR) {
-		//	M_INSERT(b->err_m);
-		//}
-
-
 	}
 
 

Modified: bsockets/trunk/test.c
===================================================================
--- bsockets/trunk/test.c	2006-08-10 09:30:25 UTC (rev 7015)
+++ bsockets/trunk/test.c	2006-08-10 10:44:33 UTC (rev 7016)
@@ -1800,7 +1800,6 @@
 	{test_maxoverlapped,NULL,"Test if we can have a sufficient number of outstanding operations."},
 	{test_bselect_macros,NULL,"Testing bselect() macros."},
 	//todo close returns error if error has occured and not been collected
-//	{test_multieventselect,NULL,"Can we have more than one socket associated with a WSAevent."},
 	//{test_theory1,NULL,"Test theory #1 (WSAwfme does not block when socket closed."},
 	//todo -- find a way to reduce timeout
 	//{test_badconnection_blocking,NULL,"Test if connection to unreachable host fails appropriately. (blocking)"},

Deleted: bsockets/trunk/todo
===================================================================
--- bsockets/trunk/todo	2006-08-10 09:30:25 UTC (rev 7015)
+++ bsockets/trunk/todo	2006-08-10 10:44:33 UTC (rev 7016)
@@ -1,10 +0,0 @@
-todo
------
-
-- make getsockopt()
-- make listen()
-- make accept()
-- make read()
-- make write()
-- make socketpair()
-- make bsocket.c (links to system specific versions)