* TcpClient.cs: common_constructor() changed to Init() to match coding
[mono.git] / mcs / class / System / System.Net.Sockets / Socket.cs
1 // System.Net.Sockets.Socket.cs
2 //
3 // Author:
4 //    Phillip Pearson (pp@myelin.co.nz)
5 //
6 // Copyright (C) 2001, Phillip Pearson
7 //    http://www.myelin.co.nz
8 //
9
10 // NB: This is untested (probably buggy) code - take care if using it
11 //     Nowhere near finished yet ...
12
13 using System;
14 using System.Net;
15 using System.Collections;
16
17 namespace System.Net.Sockets \r
18 {
19
20         public class Socket : IDisposable \r
21         {
22                 // static method:
23
24                 /// <summary>\r
25                 /// Blocks while waiting for readability, writeability or\r
26                 /// error conditions on a number of sockets\r
27                 /// </summary>\r
28                 /// <param name="read_list">A list of sockets to watch\r
29                 /// for readability</param>\r
30                 /// <param name="write_list">A list of sockets to watch\r
31                 /// for writeability</param>\r
32                 /// <param name="err_list">A list of sockets to watch\r
33                 /// for errors</param>\r
34                 /// <param name="time_us">Timeout, in microseconds</param>
35                 public static void Select (
36                         IList read_list,
37                         IList write_list,
38                         IList err_list,
39                         int time_us)
40                 {
41                         throw new NotImplementedException();
42                 }
43
44                 // public constructor:
45
46                 /// <summary>\r
47                 /// Makes a new Socket\r
48                 /// </summary>\r
49                 /// <param name="family">Address family (e.g. \r
50                 /// AddressFamily.InterNetwork for IPv4)</param>\r
51                 /// <param name="type">Socket Type (e.g. SocketType.Stream\r
52                 /// for stream sockets)</param>\r
53                 /// <param name="proto">Protocol (e.g.
54                 /// ProtocolType.Tcp for TCP)</param>
55                 public Socket (\r
56                         AddressFamily family,\r
57                         SocketType type,\r
58                         ProtocolType proto)\r
59                 {
60                         throw new NotImplementedException();
61                 }
62
63                 // public properties:
64
65                 /// <summary>\r
66                 /// The address family (see contructor)\r
67                 /// </summary>
68                 public AddressFamily AddressFamily\r
69                 {
70                         get \r
71                         {
72                                 throw new NotImplementedException();
73                                 //return AddressFamily.InterNetwork;
74                         }
75                 }
76
77                 /// <summary>\r
78                 /// How much data is waiting to be read (i.e. the amount\r
79                 /// of data in the in buffer)\r
80                 /// </summary>
81                 public int Available \r
82                 {
83                         get {
84                                 throw new NotImplementedException();
85                                 //return 0;
86                         }
87                 }
88
89                 /// <summary>\r
90                 /// A flag to indicate whether the socket is a blocking\r
91                 /// socket or not.  Returns true if blocking.\r
92                 /// \r
93                 /// A non-blocking socket (Blocking == false) will return\r
94                 /// control to the application immediately if any calls are\r
95                 /// made that may take a while to complete.  Blocking\r
96                 /// sockets will block the app until whatever they are doing\r
97                 /// is finished.\r
98                 /// </summary>
99                 public bool Blocking \r
100                 {
101                         get {
102                                 throw new NotImplementedException();
103                                 //return false;
104                         }
105                         set { }
106                 }
107
108                 /// <summary>\r
109                 /// A flag to say whether the socket is connected to something\r
110                 /// or not.\r
111                 /// \r
112                 /// Returns true if connected.\r
113                 /// </summary>
114                 public bool Connected \r
115                 {
116                         get {
117                                 throw new NotImplementedException();
118                                 //return false;
119                         }
120                 }
121
122                 /// <summary>\r
123                 /// A handle to the socket (its file descriptor?)\r
124                 /// </summary>
125                 public IntPtr Handle \r
126                 {
127                         get {
128                                 throw new NotImplementedException();
129                                 //return new IntPtr(0);
130                         }
131                 }
132
133                 /// <summary>\r
134                 /// The socket's local endpoint (where it's coming from)\r
135                 /// </summary>
136                 public EndPoint LocalEndPoint \r
137                 {
138                         get {
139                                 throw new NotImplementedException();
140                                 //return new IPEndPoint(0,0);
141                         }
142                 }
143
144                 /// <summary>\r
145                 /// Protocol type (e.g. Tcp, Udp)\r
146                 /// </summary>
147                 public ProtocolType ProtocolType \r
148                 {
149                         get {
150                                 throw new NotImplementedException();
151                                 //return ProtocolType.Tcp;
152                         }
153                 }
154
155                 /// <summary>\r
156                 /// The socket's remote endpoint (where it's connected to)\r
157                 /// </summary>
158                 public EndPoint RemoteEndPoint \r
159                 {
160                         get {
161                                 throw new NotImplementedException();
162                                 //return new IPEndPoint(0,0);
163                         }
164                 }
165
166                 /// <summary>\r
167                 /// Socket type (e.g. datagram, stream)\r
168                 /// </summary>
169                 public SocketType SocketType \r
170                 {
171                         get {
172                                 throw new NotImplementedException();
173                                 //return SocketType.Stream;
174                         }
175                 }
176
177                 // public methods:
178
179                 /// <summary>\r
180                 /// Accepts a new connection\r
181                 /// </summary>\r
182                 /// <returns>A new socket to handle the connection</returns>
183                 public Socket Accept () \r
184                 {
185                         throw new NotImplementedException();
186                         //return new Socket(AddressFamily.InterNetwork,
187                         //      SocketType.Stream, ProtocolType.Tcp);
188                 }
189
190                 /// <summary>\r
191                 /// Accepts the connection in the background,\r
192                 /// calling the application back when finished.\r
193                 /// </summary>\r
194                 /// <param name="callback">A delegate to be called\r
195                 /// when the accept is finished</param>\r
196                 /// <param name="state">State information for this call</param>\r
197                 /// <returns></returns>
198                 public IAsyncResult BeginAccept (
199                         AsyncCallback callback,
200                         object state)
201                 {
202                         throw new NotImplementedException();
203                 }
204
205                 /// <summary>\r
206                 /// Connects to a remote endpoint in the background,\r
207                 /// calling back when finished.\r
208                 /// </summary>\r
209                 /// <param name="remote_end_point">The endpoint to\r
210                 /// connect to</param>\r
211                 /// <param name="callback">Where to call when done</param>\r
212                 /// <param name="state">State information for this call</param>\r
213                 /// <returns></returns>
214                 public IAsyncResult BeginConnect (
215                         EndPoint remote_end_point,
216                         AsyncCallback callback,
217                         object state)
218                 {
219                         throw new NotImplementedException();
220                 }
221
222                 /// <summary>\r
223                 /// Receives data in the background, calling\r
224                 /// back when finished.\r
225                 /// </summary>\r
226                 /// <param name="buffer">A buffer to put the data into as it\r
227                 /// arrives</param>\r
228                 /// <param name="offset">Where to put the data (offset into\r
229                 /// the buffer)</param>\r
230                 /// <param name="size">Buffer size</param>\r
231                 /// <param name="socket_flags">Socket flags</param>\r
232                 /// <param name="callback">Where to call when the\r
233                 /// operation is finished</param>\r
234                 /// <param name="state">State info for this call</param>\r
235                 /// <returns></returns>
236                 public IAsyncResult BeginReceive (
237                         byte[] buffer,
238                         int offset,
239                         int size,
240                         SocketFlags socket_flags,
241                         AsyncCallback callback,
242                         object state)
243                 {
244                         throw new NotImplementedException();
245                 }
246
247                 /// <summary>\r
248                 /// Receives data in the background from a specific\r
249                 /// point, calling back when finished.\r
250                 /// </summary>\r
251                 /// <param name="buffer">A buffer to put the data into as it\r
252                 /// arrives</param>\r
253                 /// <param name="offset">Where to put the data (offset into\r
254                 /// the buffer)</param>\r
255                 /// <param name="size">Buffer size</param>\r
256                 /// <param name="socket_flags">Socket flags</param>\r
257                 /// <param name="remote_end_point">Where to receive from</param>\r
258                 /// <param name="callback">Where to call when the\r
259                 /// operation is finished</param>\r
260                 /// <param name="state">State info for this call</param>\r
261                 /// <returns></returns>
262                 public IAsyncResult BeginReceiveFrom (
263                         byte[] buffer,
264                         int offset,
265                         int size,
266                         SocketFlags socket_flags,
267                         ref EndPoint remote_end_point,
268                         AsyncCallback callback,
269                         object state)
270                 {
271                         throw new NotImplementedException();
272                 }
273
274                 /// <summary>\r
275                 /// Starts sending data somewhere, in the background.\r
276                 /// </summary>\r
277                 /// <param name="buffer">Buffer containing the data to send</param>\r
278                 /// <param name="offset">Where in the buffer to start sending from</param>\r
279                 /// <param name="size">Buffer size</param>\r
280                 /// <param name="socket_flags">Socket flags</param>\r
281                 /// <param name="callback">Where to call back to when finished</param>\r
282                 /// <param name="state">State info for this call</param>\r
283                 /// <returns></returns>
284                 public IAsyncResult BeginSend (
285                         byte[] buffer,
286                         int offset,
287                         int size,
288                         SocketFlags socket_flags,
289                         AsyncCallback callback,
290                         object state)
291                 {
292                         throw new NotImplementedException();
293                 }
294
295                 /// <summary>\r
296                 /// Starts sending data to a specific point, in the background\r
297                 /// </summary>\r
298                 /// <param name="buffer"></param>\r
299                 /// <param name="offset"></param>\r
300                 /// <param name="size"></param>\r
301                 /// <param name="socket_flags"></param>\r
302                 /// <param name="remote_end_point"></param>\r
303                 /// <param name="callback">Where to call back to when\r
304                 /// finished sending</param>\r
305                 /// <param name="state"></param>\r
306                 /// <returns></returns>
307                 public IAsyncResult BeginSendTo (
308                         byte[] buffer,
309                         int offset,
310                         int size,
311                         SocketFlags socket_flags,
312                         EndPoint remote_end_point,
313                         AsyncCallback callback,
314                         object state)
315                 {
316                         throw new NotImplementedException();
317                 }
318
319                 /// <summary>\r
320                 /// Binds the socket to a local endpoint\r
321                 /// </summary>\r
322                 /// <param name="local_end_point">What to
323                 /// bind it to</param>
324                 public void Bind (EndPoint local_end_point)
325                 {
326                         throw new NotImplementedException();
327                 }
328
329                 /// <summary>\r
330                 /// Closes the socket\r
331                 /// </summary>
332                 public void Close ()
333                 {
334                         throw new NotImplementedException();
335                 }
336
337                 /// <summary>\r
338                 /// Connects to a remote system\r
339                 /// </summary>\r
340                 /// <param name="remote_end_point">Where to connect to</param>
341                 public void Connect (EndPoint remote_end_point)
342                 {
343                         throw new NotImplementedException();
344                 }
345                 
346                 /// <summary>\r
347                 /// Completes an Accept() operation started\r
348                 /// with a BeginAccept() call\r
349                 /// </summary>\r
350                 /// <param name="result"></param>\r
351                 /// <returns></returns>
352                 public Socket EndAccept (IAsyncResult result)
353                 {
354                         throw new NotImplementedException();
355                 }
356
357                 /// <summary>\r
358                 /// Completes an asynchronous Connect() operation\r
359                 /// started with a BeginConnect() call\r
360                 /// </summary>\r
361                 /// <param name="result"></param>
362                 public void EndConnect (IAsyncResult result)
363                 {
364                         throw new NotImplementedException();
365                 }
366
367                 /// <summary>\r
368                 /// Completes an asynchronous Receive() operation\r
369                 /// started with a BeginReceive() call\r
370                 /// </summary>\r
371                 /// <param name="result"></param>\r
372                 /// <returns></returns>
373                 public int EndReceive (IAsyncResult result)
374                 {
375                         throw new NotImplementedException();
376                 }
377
378                 /// <summary>\r
379                 /// Completes an asynchronous ReceiveFrom() operation\r
380                 /// started with a BeginReceiveFrom() call\r
381                 /// </summary>\r
382                 /// <param name="result"></param>\r
383                 /// <param name="end_point"></param>\r
384                 /// <returns></returns>
385                 public int EndReceiveFrom (
386                         IAsyncResult result,
387                         ref EndPoint end_point)
388                 {
389                         throw new NotImplementedException();
390                 }
391
392                 /// <summary>\r
393                 /// Completes an asynchronous Send() operation\r
394                 /// started with a BeginSend() call\r
395                 /// </summary>\r
396                 /// <param name="result"></param>\r
397                 /// <returns></returns>
398                 public int EndSend (IAsyncResult result)
399                 {
400                         throw new NotImplementedException();
401                 }
402
403                 /// <summary>\r
404                 /// Completes an asynchronous SendTo() operation\r
405                 /// started with a BeginSendTo() call\r
406                 /// </summary>\r
407                 /// <param name="result"></param>\r
408                 /// <returns></returns>
409                 public int EndSendTo (IAsyncResult result)
410                 {
411                         throw new NotImplementedException();
412                 }
413
414                 /// <summary>\r
415                 /// Gets a socket option\r
416                 /// </summary>\r
417                 /// <param name="level"></param>\r
418                 /// <param name="name"></param>\r
419                 /// <returns></returns>
420                 public object GetSocketOption (
421                         SocketOptionLevel level,
422                         SocketOptionName name)
423                 {
424                         throw new NotImplementedException();
425                 }
426
427                 /// <summary>\r
428                 /// Gets a socket option\r
429                 /// </summary>\r
430                 /// <param name="level"></param>\r
431                 /// <param name="name"></param>\r
432                 /// <param name="opt_value"></param>
433                 public void GetSocketOption (
434                         SocketOptionLevel level,
435                         SocketOptionName name,
436                         byte[] opt_value)
437                 {
438                         throw new NotImplementedException();
439                 }
440
441                 /// <summary>\r
442                 /// Gets a socket option\r
443                 /// </summary>\r
444                 /// <param name="level"></param>\r
445                 /// <param name="name"></param>\r
446                 /// <param name="length"></param>\r
447                 /// <returns></returns>
448                 public byte[] GetSocketOption (
449                         SocketOptionLevel level,
450                         SocketOptionName name,
451                         int length)
452                 {
453                         throw new NotImplementedException();
454                 }
455
456                 /// <summary>\r
457                 /// Does something to the socket, a la ioctl()\r
458                 /// </summary>\r
459                 /// <param name="ioctl_code">Code of the operation\r
460                 /// to perform on the socket</param>\r
461                 /// <param name="in_value">Data to pass to ioctl()</param>\r
462                 /// <param name="out_value">Data returned from ioctl()</param>\r
463                 /// <returns></returns>
464                 public int IOControl (
465                         int ioctl_code,
466                         byte[] in_value,
467                         byte[] out_value)
468                 {
469                         throw new NotImplementedException();
470                 }
471
472                 /// <summary>\r
473                 /// Tells the socket to start listening\r
474                 /// </summary>\r
475                 /// <param name="backlog">Connection backlog - the number 
476                 /// of pending (not Accept()ed) connections that will be
477                 /// allowed before new connections are automatically
478                 /// refused</param>
479                 public void Listen (int backlog)
480                 {
481                         throw new NotImplementedException();
482                 }
483
484                 /// <summary>\r
485                 /// Blocks the application until the socket is either\r
486                 /// readable, writeable or has an error condition\r
487                 /// </summary>\r
488                 /// <param name="time_us">How long to wait, in microseconds</param>\r
489                 /// <param name="mode">What to wait for (reading, writing, error)</param>\r
490                 /// <returns></returns>
491                 public bool Poll (int time_us, SelectMode mode)
492                 {
493                         throw new NotImplementedException();
494                 }
495                 
496                 /// <summary>\r
497                 /// Receives data from the socket\r
498                 /// </summary>\r
499                 /// <param name="buf"></param>\r
500                 /// <returns></returns>
501                 public int Receive (
502                         byte[] buf)
503                 {
504                         throw new NotImplementedException();
505                 }
506
507                 /// <summary>\r
508                 /// Receives data from the socket\r
509                 /// </summary>\r
510                 /// <param name="buf"></param>\r
511                 /// <param name="flags"></param>\r
512                 /// <returns></returns>
513                 public int Receive (
514                         byte[] buf,
515                         SocketFlags flags)
516                 {
517                         throw new NotImplementedException();
518                 }
519
520                 /// <summary>\r
521                 /// Receives data from the socket\r
522                 /// </summary>\r
523                 /// <param name="buf"></param>\r
524                 /// <param name="size"></param>\r
525                 /// <param name="flags"></param>\r
526                 /// <returns></returns>
527                 public int Receive (
528                         byte[] buf,
529                         int size,
530                         SocketFlags flags)
531                 {
532                         throw new NotImplementedException();
533                 }
534
535                 /// <summary>\r
536                 /// Receives data from the socket\r
537                 /// </summary>\r
538                 /// <param name="buf"></param>\r
539                 /// <param name="offset"></param>\r
540                 /// <param name="size"></param>\r
541                 /// <param name="flags"></param>\r
542                 /// <returns></returns>
543                 public int Receive (
544                         byte[] buf,
545                         int offset,
546                         int size,
547                         SocketFlags flags)
548                 {
549                         throw new NotImplementedException();
550                 }
551                 
552                 /// <summary>\r
553                 /// Receives data from a specific point, \r
554                 /// through the socket\r
555                 /// </summary>\r
556                 /// <param name="buf"></param>\r
557                 /// <param name="remote_end_point"></param>\r
558                 /// <returns></returns>
559                 public int ReceiveFrom (
560                         byte[] buf,
561                         ref EndPoint remote_end_point)
562                 {
563                         throw new NotImplementedException();
564                 }
565
566                 /// <summary>\r
567                 /// Receives data from a specific point, \r
568                 /// through the socket\r
569                 /// </summary>\r
570                 /// <param name="buf"></param>\r
571                 /// <param name="flags"></param>\r
572                 /// <param name="remote_end_point"></param>\r
573                 /// <returns></returns>
574                 public int ReceiveFrom (
575                         byte[] buf,
576                         SocketFlags flags,
577                         ref EndPoint remote_end_point)
578                 {
579                         throw new NotImplementedException();
580                 }
581
582                 /// <summary>\r
583                 /// Receives data from a specific point, \r
584                 /// through the socket\r
585                 /// </summary>\r
586                 /// <param name="buf"></param>\r
587                 /// <param name="size"></param>\r
588                 /// <param name="flags"></param>\r
589                 /// <param name="remote_end_point"></param>\r
590                 /// <returns></returns>
591                 public int ReceiveFrom (
592                         byte[] buf,
593                         int size,
594                         SocketFlags flags,
595                         ref EndPoint remote_end_point)
596                 {
597                         throw new NotImplementedException();
598                 }
599
600                 /// <summary>\r
601                 /// Receives data from a specific point, \r
602                 /// through the socket\r
603                 /// </summary>\r
604                 /// <param name="buf"></param>\r
605                 /// <param name="offset"></param>\r
606                 /// <param name="size"></param>\r
607                 /// <param name="flags"></param>\r
608                 /// <param name="remote_end_point"></param>\r
609                 /// <returns></returns>
610                 public int ReceiveFrom (
611                         byte[] buf,
612                         int offset,
613                         int size,
614                         SocketFlags flags,
615                         ref EndPoint remote_end_point)
616                 {
617                         throw new NotImplementedException();
618                 }
619
620
621                 /// <summary>\r
622                 /// Sends data through the socket\r
623                 /// </summary>\r
624                 /// <param name="buffer"></param>\r
625                 /// <returns></returns>
626                 public int Send (
627                         byte[] buffer)
628                 {
629                         throw new NotImplementedException();
630                 }
631
632                 /// <summary>\r
633                 /// Sends data through the socket\r
634                 /// </summary>\r
635                 /// <param name="buffer"></param>\r
636                 /// <param name="flags"></param>\r
637                 /// <returns></returns>
638                 public int Send (
639                         byte[] buffer,
640                         SocketFlags flags)
641                 {
642                         throw new NotImplementedException();
643                 }
644
645                 /// <summary>\r
646                 /// Sends data through the socket\r
647                 /// </summary>\r
648                 /// <param name="buffer"></param>\r
649                 /// <param name="size"></param>\r
650                 /// <param name="flags"></param>\r
651                 /// <returns></returns>
652                 public int Send (
653                         byte[] buffer,
654                         int size,
655                         SocketFlags flags)
656                 {
657                         throw new NotImplementedException();
658                 }
659
660                 /// <summary>\r
661                 /// Sends data through the socket\r
662                 /// </summary>\r
663                 /// <param name="buffer"></param>\r
664                 /// <param name="offset"></param>\r
665                 /// <param name="size"></param>\r
666                 /// <param name="flags"></param>\r
667                 /// <returns></returns>
668                 public int Send (
669                         byte[] buffer,
670                         int offset,
671                         int size,
672                         SocketFlags flags)
673                 {
674                         throw new NotImplementedException();
675                 }
676
677                 /// <summary>\r
678                 /// Sends data to a specific point,\r
679                 /// through the socket\r
680                 /// </summary>\r
681                 /// <param name="buffer"></param>\r
682                 /// <param name="remote_end_point"></param>\r
683                 /// <returns></returns>
684                 public int SendTo (
685                         byte[] buffer,
686                         EndPoint remote_end_point)
687                 {
688                         throw new NotImplementedException();
689                 }
690
691                 /// <summary>\r
692                 /// Sends data to a specific point,\r
693                 /// through the socket\r
694                 /// </summary>\r
695                 /// <param name="buffer"></param>\r
696                 /// <param name="flags"></param>\r
697                 /// <param name="remote_end_point"></param>\r
698                 /// <returns></returns>
699                 public int SendTo (
700                         byte[] buffer,
701                         SocketFlags flags,
702                         EndPoint remote_end_point)
703                 {
704                         throw new NotImplementedException();
705                 }
706
707                 /// <summary>\r
708                 /// Sends data to a specific point,\r
709                 /// through the socket\r
710                 /// </summary>\r
711                 /// <param name="buffer"></param>\r
712                 /// <param name="size"></param>\r
713                 /// <param name="flags"></param>\r
714                 /// <param name="remote_end_point"></param>\r
715                 /// <returns></returns>
716                 public int SendTo (
717                         byte[] buffer,
718                         int size,
719                         SocketFlags flags,
720                         EndPoint remote_end_point)
721                 {
722                         throw new NotImplementedException();
723                 }
724
725                 /// <summary>\r
726                 /// Sends data to a specific point,\r
727                 /// through the socket\r
728                 /// </summary>\r
729                 /// <param name="buffer"></param>\r
730                 /// <param name="offset"></param>\r
731                 /// <param name="size"></param>\r
732                 /// <param name="flags"></param>\r
733                 /// <param name="remote_end_point"></param>\r
734                 /// <returns></returns>
735                 public int SendTo (
736                         byte[] buffer,
737                         int offset,
738                         int size,
739                         SocketFlags flags,
740                         EndPoint remote_end_point)
741                 {
742                         throw new NotImplementedException();
743                 }
744
745                 /// <summary>\r
746                 /// Sets a socket option (like setsockopt())\r
747                 /// </summary>\r
748                 /// <param name="level"></param>\r
749                 /// <param name="name"></param>\r
750                 /// <param name="opt_value"></param>
751                 public void SetSocketOption (
752                         SocketOptionLevel level,
753                         SocketOptionName name,
754                         byte[] opt_value)
755                 {
756                         throw new NotImplementedException();
757                 }
758
759                 /// <summary>\r
760                 /// Sets a socket option (like setsockopt())\r
761                 /// </summary>\r
762                 /// <param name="level"></param>\r
763                 /// <param name="name"></param>\r
764                 /// <param name="opt_value"></param>
765                 public void SetSocketOption (
766                         SocketOptionLevel level,
767                         SocketOptionName name,
768                         int opt_value)
769                 {
770                         throw new NotImplementedException();
771                 }
772
773                 /// <summary>\r
774                 /// Sets a socket option (like setsockopt())\r
775                 /// </summary>\r
776                 /// <param name="level"></param>\r
777                 /// <param name="name"></param>\r
778                 /// <param name="opt_value"></param>
779                 public void SetSocketOption (
780                         SocketOptionLevel level,
781                         SocketOptionName name,
782                         object opt_value)
783                 {
784                         throw new NotImplementedException();
785                 }
786
787                 /// <summary>\r
788                 /// Stops anyone from being able to read or write to the socket\r
789                 /// </summary>\r
790                 /// <param name="how">What people aren't allowed to do any
791                 /// more (you can disable just reading or just writing, or both)</param>
792                 public void Shutdown (SocketShutdown how)
793                 {
794                         throw new NotImplementedException();
795                 }
796
797                 /// <summary>\r
798                 /// A stringified representation of the socket\r
799                 /// </summary>\r
800                 /// <returns></returns>
801                 public override string ToString ()
802                 {
803                         throw new NotImplementedException();
804                         //return "foo";
805                 }
806
807
808
809                 // protected methods:
810
811                 /// <summary>\r
812                 /// Disposes of all unmanaged resources, and\r
813                 /// managed resources too if requested\r
814                 /// </summary>\r
815                 /// <param name="disposing">Set this to true
816                 /// to dispose of managed resources</param>
817                 protected virtual void Dispose (bool disposing)
818                 {
819                         // file descriptor / socket
820                         // other things to dispose of?
821
822                         // managed things?
823
824                         throw new NotImplementedException();
825                 }
826
827                 /// <summary>\r
828                 /// Disposes of everything (managed and\r
829                 /// unmanaged resources)\r
830                 /// </summary>
831                 public void Dispose ()
832                 {
833                         Dispose(true);
834                 }
835
836                 /// <summary>\r
837                 /// Destructor - disposes of unmanaged resources\r
838                 /// </summary>
839                 ~Socket ()
840                 {
841                         Dispose(false);
842                         throw new NotImplementedException();
843                 }
844
845         }
846
847 }