|
@@ -105,12 +105,13 @@ func (socket *Socket) Write(data []byte) (err error) {
|
105
|
105
|
}
|
106
|
106
|
|
107
|
107
|
// BlockingWrite sends the given string out of Socket. Requirements:
|
108
|
|
-// 1. MUST block until the message is sent
|
109
|
|
-// 2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow)
|
110
|
|
-// 3. MUST provide mutual exclusion for socket.conn.Write
|
111
|
|
-// 4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends
|
112
|
|
-// message m1 happens-before a call to BlockingWrite that sends message m2,
|
113
|
|
-// m1 must be sent on the wire before m2
|
|
108
|
+// 1. MUST block until the message is sent
|
|
109
|
+// 2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow)
|
|
110
|
+// 3. MUST provide mutual exclusion for socket.conn.Write
|
|
111
|
+// 4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends
|
|
112
|
+// message m1 happens-before a call to BlockingWrite that sends message m2,
|
|
113
|
+// m1 must be sent on the wire before m2
|
|
114
|
+//
|
114
|
115
|
// Callers MUST be writing to the client's socket from the client's own goroutine;
|
115
|
116
|
// other callers must use the nonblocking Write call instead. Otherwise, a client
|
116
|
117
|
// with a slow/unreliable connection risks stalling the progress of the system as a whole.
|