Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Network Communication Library

Network Communication Library

Scheduled Pinned Locked Moved Design and Architecture
sysadminjsonhelp
3 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ri Qen Sin
    wrote on last edited by
    #1

    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
    L 1 Reply Last reply
    0
    • R Ri Qen Sin

      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
      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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.


      R 1 Reply Last reply
      0
      • L Luc Pattyn

        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.


        R Offline
        R Offline
        Ri Qen Sin
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups