You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/01/29 08:23:41 UTC

[GitHub] [dubbo-getty] AlexStocks commented on a change in pull request #58: Ftr: return the total length and write length

AlexStocks commented on a change in pull request #58:
URL: https://github.com/apache/dubbo-getty/pull/58#discussion_r566648354



##########
File path: client_test.go
##########
@@ -170,8 +170,10 @@ func TestTCPClient(t *testing.T) {
 
 func TestUDPClient(t *testing.T) {
 	var (
-		err  error
-		conn *net.UDPConn
+		err      error
+		conn     *net.UDPConn
+		leng     int

Review comment:
       leng -> sendLength

##########
File path: getty.go
##########
@@ -171,7 +171,9 @@ type Session interface {
 
 	// the Writer will invoke this function. Pls attention that if timeout is less than 0, WritePkg will send @pkg asap.
 	// for udp session, the first parameter should be UDPContext.
-	WritePkg(pkg interface{}, timeout time.Duration) error
+	// total: need send total bytes

Review comment:
       // WritePkg: encode package @pkg to bytes steam and send them out
   //
   // totalBytesLength: @pkg stream bytes length after encoding @pkg.
   // sendBytesLength: stream bytes length that sent out successfully.
   // error: send out error from system




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org