|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
A TcpConnection that exchanges message using a MessageReader and MessageWriter pair.
Field Summary | |
---|---|
NetSamples.Common.IO.MessageReader | reader |
NetSamples.Common.Net.MessageConnection.ReceiveDelegate | receiver |
NetSamples.Common.Net.MessageConnection.SendDelegate | sender |
NetSamples.Common.IO.MessageWriter | writer |
Fields inherited from class NetSamples.Common.Net.TcpConnection |
---|
socket, stream |
Constructor Summary | |
---|---|
MessageConnection(System.Type[] messagetypes) Constructor |
|
MessageConnection(System.Net.Sockets.Socket socket, System.Type[] messagetypes) Constructor |
Properties inherited from class NetSamples.Common.Net.TcpConnection |
---|
Connected, LocalEndPoint, RemoteEndPoint |
Method Summary | |
---|---|
System.IAsyncResult |
BeginReceive(System.AsyncCallback callback, object state) Starts an asynchronous Receive |
System.IAsyncResult |
BeginSend(object message, System.AsyncCallback callback, object state) Starts an asynchronous Send |
void |
Close() Closes the connection |
void |
Connect(System.Net.IPEndPoint endpoint) Connect to a remote endpoint |
object |
EndReceive(System.IAsyncResult result) Ends an asynchronous Receive |
void |
EndSend(System.IAsyncResult result) Ends an asynchronous Send |
object |
Receive() Receives a message |
void |
Send(object message) Sends a message |
Methods inherited from class NetSamples.Common.Net.TcpConnection |
---|
GetStream, Receive, Send |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
protected NetSamples.Common.IO.MessageReader reader
private NetSamples.Common.Net.MessageConnection.ReceiveDelegate receiver
private NetSamples.Common.Net.MessageConnection.SendDelegate sender
protected NetSamples.Common.IO.MessageWriter writer
Constructor Detail |
---|
public MessageConnection(System.Type[] messagetypes)
Constructor
public MessageConnection(System.Net.Sockets.Socket socket, System.Type[] messagetypes)
Constructor
Method Detail |
---|
public System.IAsyncResult BeginReceive(System.AsyncCallback callback, object state)
Starts an asynchronous Receive
public System.IAsyncResult BeginSend(object message, System.AsyncCallback callback, object state)
Starts an asynchronous Send
public void Close()
Closes the connection
public void Connect(System.Net.IPEndPoint endpoint)
Connect to a remote endpoint
public object EndReceive(System.IAsyncResult result)
Ends an asynchronous Receive
public void EndSend(System.IAsyncResult result)
Ends an asynchronous Send
public object Receive()
Receives a message
public void Send(object message)
Sends a message
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |