Implementation of a BridgeLink when our end is a TCP server socket (the other end shall be a TcpClient) More...
Public Member Functions | |
TcpServer (int Port, bool openServer=false) | |
Instantiate the TCP socket server. More... | |
bool | Start () |
Start accepting clients. | |
void | Stop () |
Stop accepting clients. | |
override void | Disconnect () |
Drop the currently connected client (if some) | |
override bool | Send (byte[] frame) |
Send to the client through the pipe. | |
Public Member Functions inherited from SpringCard.PCSC.Bridge.Link.BridgeLink | |
delegate void | ConnectionStateCallback () |
Typedef for OnConnected() and OnDisconnected() callbacks. | |
delegate bool | RecvCallback (byte[] frame) |
Typedef for OnRecv() callback. | |
string | GetLinkDescription () |
Get the description of the communication link. | |
Additional Inherited Members | |
Public Attributes inherited from SpringCard.PCSC.Bridge.Link.BridgeLink | |
ConnectionStateCallback | OnConnected |
Callback invoked when a link goes up (connection with the peer is established) | |
ConnectionStateCallback | OnDisconnected |
Callback invoked when a link goes down (connection with the peer is closed, for any reason) | |
RecvCallback | OnRecv |
Callback invoked when a message is received from the peer. | |
Dictionary< string, string > | LocalInfoData = new Dictionary<string, string>() |
Get some data. | |
Dictionary< string, string > | ClientInfoData = new Dictionary<string, string>() |
Get some data. | |
Properties inherited from SpringCard.PCSC.Bridge.Link.BridgeLink | |
bool | Connected [get] |
Is the communication link up and running? | |
Implementation of a BridgeLink when our end is a TCP server socket (the other end shall be a TcpClient)
SpringCard.PCSC.Bridge.Link.BridgeLink.TcpServer.TcpServer | ( | int | Port, |
bool | openServer = false |
||
) |
Instantiate the TCP socket server.
If openServer is true, the TCP server accepts connections from remote clients. In this case, don't forget to open the port in the firewall.
If openServer is false, the TCP server accepts local connections only.