@@ -180,7 +180,7 @@ public static int ReadPartial(Socket socket, byte[] buffer, int offset, int size
180
180
receiveCompleted . Dispose ( ) ;
181
181
}
182
182
#else
183
- #error Receiving data from a Socket is not implemented.
183
+ #error Receiving data from a Socket is not implemented.
184
184
#endif
185
185
}
186
186
@@ -242,7 +242,7 @@ public static void ReadContinuous(Socket socket, byte[] buffer, int offset, int
242
242
if ( readToken . Exception != null )
243
243
throw readToken . Exception ;
244
244
#else
245
- #error Receiving data from a Socket is not implemented.
245
+ #error Receiving data from a Socket is not implemented.
246
246
#endif
247
247
}
248
248
@@ -407,11 +407,10 @@ public static void Send(Socket socket, byte[] data, int offset, int size)
407
407
{
408
408
try
409
409
{
410
- var bytesSent = socket . Send ( data , offset + totalBytesSent , totalBytesToSend - totalBytesSent ,
411
- SocketFlags . None ) ;
410
+ var bytesSent = socket . Send ( data , offset + totalBytesSent , totalBytesToSend - totalBytesSent , SocketFlags . None ) ;
412
411
if ( bytesSent == 0 )
413
412
throw new SshConnectionException ( "An established connection was aborted by the server." ,
414
- DisconnectReason . ConnectionLost ) ;
413
+ DisconnectReason . ConnectionLost ) ;
415
414
416
415
totalBytesSent += bytesSent ;
417
416
}
@@ -430,10 +429,10 @@ public static void Send(Socket socket, byte[] data, int offset, int size)
430
429
var sendCompleted = new ManualResetEvent ( false ) ;
431
430
var sendReceiveToken = new BlockingSendReceiveToken ( socket , data , offset , size , sendCompleted ) ;
432
431
var socketAsyncSendArgs = new SocketAsyncEventArgs
433
- {
434
- RemoteEndPoint = socket . RemoteEndPoint ,
435
- UserToken = sendReceiveToken
436
- } ;
432
+ {
433
+ RemoteEndPoint = socket . RemoteEndPoint ,
434
+ UserToken = sendReceiveToken
435
+ } ;
437
436
socketAsyncSendArgs . SetBuffer ( data , offset , size ) ;
438
437
socketAsyncSendArgs . Completed += SendCompleted ;
439
438
@@ -450,7 +449,7 @@ public static void Send(Socket socket, byte[] data, int offset, int size)
450
449
451
450
if ( sendReceiveToken . TotalBytesTransferred == 0 )
452
451
throw new SshConnectionException ( "An established connection was aborted by the server." ,
453
- DisconnectReason . ConnectionLost ) ;
452
+ DisconnectReason . ConnectionLost ) ;
454
453
}
455
454
finally
456
455
{
@@ -460,7 +459,7 @@ public static void Send(Socket socket, byte[] data, int offset, int size)
460
459
sendCompleted . Dispose ( ) ;
461
460
}
462
461
#else
463
- #error Sending data to a Socket is not implemented.
462
+ #error Sending data to a Socket is not implemented.
464
463
#endif
465
464
}
466
465
0 commit comments