Skip to content

Instantly share code, notes, and snippets.

@lukasz-pyrzyk
Created March 17, 2016 16:45
Show Gist options
  • Save lukasz-pyrzyk/3f36d5e0f334f4ba8a9e to your computer and use it in GitHub Desktop.
Save lukasz-pyrzyk/3f36d5e0f334f4ba8a9e to your computer and use it in GitHub Desktop.
using System;
using System.Net;
using System.Net.Sockets;
namespace XGain.Sockets
{
public interface ISocket : IDisposable
{
int BufferSize { get; }
bool Connected { get; }
Socket InternalSocket { get; }
EndPoint LocalEndPoint { get; }
EndPoint RemoteEndPoint { get; }
ISocket Accept();
void Bind(IPEndPoint localEndPoint);
void Connect(IPEndPoint remoteEndPoint);
void Listen(int backlog);
int Receive(byte[] buffer);
int Send(byte[] buffer);
void Shutdown(SocketShutdown how);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment