Code Monkey home page Code Monkey logo

netsocket's Introduction

NETSOCKET TCP CLIENT-SERVER SOCKET LIB

Library builds to NetSocket.dll
Works in .Net 2.0+ and mono 2.6+

Allows binary messages to be sent from client to server and vice-versa. Messages are prefixed with a simple header to track messages boundaries and keep everything synchronized. Messages are sent asynchronously in the order they are queued. The library automatically handles errors and disconnection as well as other erratum associated with the built-in Socket class.


Includes demo applications TestNetClient and TestNetServer

The TestNetServer application simply listens for connections on port 3333 and automatically accepts the first clients that connect. Valid messages are logged and echoed back to the client.

The TestNetClient application can connect to the server and send text messages or files.


Enums:
JLM.NetSocket.SocketState { Closed, Closing, Connected, Connecting, Listening }

Classes:
JLM.NetSocket.NetSocketConnectedEventArgs
	Properties:
	IPAddress SourceIP

JLM.NetSocket.NetSocketDisconnectedEventArgs
	Properties:
	string Reason;

JLM.NetSocket.NetSockStateChangedEventArgs
	Properties:
	SocketState NewState
	SocketState PrevState

JLM.NetSocket.NetSockDataArrivalEventArgs
	Properties:
	byte[] Data

JLM.NetSocket.NetSockErrorReceivedEventArgs
	Properties:
	string Function
	Exception Exception

JLM.NetSocket.NetSockConnectionRequestEventArgs
	Properties:
	Socket Client


JLM.NetSocket.NetBase (abstract)
	Properties:
	SocketState State
	int LocalPort
	string[] LocalIP
	
	Events:
	Connected
	Disconnected
	StateChanged
	DataArrived
	ErrorReceived

	Methods:
	void Send(byte[] data)
	void Close(string reason)


JLM.NetSocket.NetClient > NetBase
	Events:
	ConnectionRequested

	Methods:
	void Listen(int port)
	void Accept(Socket client)
	

JLM.NetSocket.NetServer > NetBase
	Methods:
	void Connect(IPEndPoint server)


License: LGPL <http://www.gnu.org/licenses/lgpl.html>
Copyright: 2011 Jeremy Messenger

netsocket's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.