Network Communication Library
-
I'm designing a class library to facilitate communications over TCP/IP. It has ease of use in mind and is event-oriented. Despite the departure from the base class library's way of exposing the networking functionality (synchronous and asynchronous methods), the class library I’m writing is based on a couple of classes from the base class library—the TcpListener and TcpClient classes in particular. It doesn't derive from it, but the API is very similar:
public class CorruptDataException : ApplicationException
- public CorruptDataException()
- public CorruptDataException(string message);
- public CorruptDataException(string message, Exception innerException)
- protected CorruptDataException(SerializationInfo info, StreamingContext context)
public sealed class ConnectCompletedEventArgs : EventArgs
- internal ConnectCompletedEventArgs(object userToken)
- public object UserState { get; }
public sealed class DisconnectedEventArgs : EventArgs
- internal DisconnectedEventArgs(DisconnectReason reason, object userToken)
- public DisconnectReason Reason { get; }
- public object UserState { get; }
public enum DisconnectReason : int
- DisconnectCall = 1
- None = 0
- RemoteDeviceDisconnected = -1
public sealed class ReceiveCompletedEventArgs : EventArgs
- internal ReceiveCompletedEventArgs(Exception ex, IList<byte[]> data, object userToken)
- public IList<byte[]> Data { get; }
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SendCompletedEventArgs : EventArgs
- internal SendCompletedEventArgs(Exception ex, object userToken)
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SlipClient : IDisposable
- public SlipClient()
- public void Connect(EndPoint remoteEP)
- public void Connect(IPAddress[] addresses, int port)
- public void Connect(IPAddress address, int port)
- public void Connect(string host, int port)
- public void ConnectAsync(EndPoint remoteEP, object userToken)
- public void ConnectAsync(IPAddress[] addresses, int port, object userTo
-
I'm designing a class library to facilitate communications over TCP/IP. It has ease of use in mind and is event-oriented. Despite the departure from the base class library's way of exposing the networking functionality (synchronous and asynchronous methods), the class library I’m writing is based on a couple of classes from the base class library—the TcpListener and TcpClient classes in particular. It doesn't derive from it, but the API is very similar:
public class CorruptDataException : ApplicationException
- public CorruptDataException()
- public CorruptDataException(string message);
- public CorruptDataException(string message, Exception innerException)
- protected CorruptDataException(SerializationInfo info, StreamingContext context)
public sealed class ConnectCompletedEventArgs : EventArgs
- internal ConnectCompletedEventArgs(object userToken)
- public object UserState { get; }
public sealed class DisconnectedEventArgs : EventArgs
- internal DisconnectedEventArgs(DisconnectReason reason, object userToken)
- public DisconnectReason Reason { get; }
- public object UserState { get; }
public enum DisconnectReason : int
- DisconnectCall = 1
- None = 0
- RemoteDeviceDisconnected = -1
public sealed class ReceiveCompletedEventArgs : EventArgs
- internal ReceiveCompletedEventArgs(Exception ex, IList<byte[]> data, object userToken)
- public IList<byte[]> Data { get; }
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SendCompletedEventArgs : EventArgs
- internal SendCompletedEventArgs(Exception ex, object userToken)
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SlipClient : IDisposable
- public SlipClient()
- public void Connect(EndPoint remoteEP)
- public void Connect(IPAddress[] addresses, int port)
- public void Connect(IPAddress address, int port)
- public void Connect(string host, int port)
- public void ConnectAsync(EndPoint remoteEP, object userToken)
- public void ConnectAsync(IPAddress[] addresses, int port, object userTo
Hi, I am not going to study and comment on your protocol, but I have one remark: there already is a SLIP protocol[^], you may consider choosing a different name. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Hi, I am not going to study and comment on your protocol, but I have one remark: there already is a SLIP protocol[^], you may consider choosing a different name. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
That's disappointing. :(
So the creationist says: Everything must have a designer. God designed everything. I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?