@@ -117,8 +117,6 @@ public ref class Test
117
117
118
118
static void Listen ()
119
119
{
120
-
121
- // <snippet6>
122
120
// This server waits for a connection and then uses asynchronous operations to
123
121
// accept the connection with initial data sent from the client.
124
122
// Establish the local endpoint for the socket.
@@ -169,12 +167,8 @@ public ref class Test
169
167
state->workSocket = handler;
170
168
handler->BeginReceive ( state->buffer , 0 , StateObject::BufferSize, static_cast <SocketFlags>(0 ), gcnew AsyncCallback ( ReadCallback ), state );
171
169
}
172
-
173
-
174
- // </snippet6>
175
170
static void ListenWithSocket ()
176
171
{
177
- // <snippet7>
178
172
// This server waits for a connection and then uses asynchronous operations to
179
173
// accept the connection with initial data sent from the client.
180
174
// Establish the local endpoint for the socket.
@@ -225,7 +219,6 @@ public ref class Test
225
219
handler->BeginReceive ( state->buffer , 0 , StateObject::BufferSize, static_cast <SocketFlags>(0 ), gcnew AsyncCallback ( ReadCallback ), state );
226
220
}
227
221
228
- // </snippet7>
229
222
static void ReadCallback ( IAsyncResult^ ar )
230
223
{
231
224
String^ content = String::Empty;
@@ -322,7 +315,6 @@ public ref class Test
322
315
323
316
public:
324
317
325
- // <snippet9>
326
318
static void AsynchronousFileSend ()
327
319
{
328
320
// Send a file to a remote device.
@@ -363,10 +355,6 @@ public ref class Test
363
355
sendDone->Set ();
364
356
}
365
357
366
- // </snippet9>
367
-
368
-
369
- // <snippet10>
370
358
public:
371
359
static void AsynchronousFileSendWithBuffers ()
372
360
{
@@ -417,7 +405,6 @@ public ref class Test
417
405
client->EndSendFile ( ar );
418
406
sendDone->Set ();
419
407
}
420
- // </snippet10>
421
408
422
409
static void ConnectCallback ( IAsyncResult^ ar )
423
410
{
@@ -476,7 +463,6 @@ public ref class Test
476
463
public:
477
464
static void ClientDisconnect ()
478
465
{
479
- // <snippet11>
480
466
// Establish the remote endpoint for the socket.
481
467
// For this example use local computer.
482
468
IPHostEntry^ ipHostInfo = Dns::GetHostEntry ( Dns::GetHostName () );
@@ -525,7 +511,6 @@ public ref class Test
525
511
526
512
public:
527
513
528
- // </snippet11>
529
514
static void SynchronousServer ()
530
515
{
531
516
// Establish the local endpoint for the socket.
0 commit comments