Definition at line 24 of file TcpClientConnector.cs.
override NetworkStream Deveel.Data.Protocol.TcpClientConnector.CreateNetworkStream |
( |
ConnectionEndPoint |
remoteEndPoint, |
|
|
FileAccess |
access |
|
) |
| |
|
inlineprotectedvirtual |
Implements Deveel.Data.Protocol.NetworkClientConnector.
Definition at line 65 of file TcpClientConnector.cs.
66 if (remoteEndPoint == null)
67 throw new ArgumentNullException(
"remoteEndPoint");
68 if (remoteEndPoint.Protocol != KnownConnectionProtocols.TcpIp)
69 throw new ArgumentException();
73 var sockect =
new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
75 sockect.ReceiveTimeout =
Timeout;
76 sockect.Connect(endPoint);
78 return new NetworkStream(sockect, access,
true);
EndPoint ParseEndPoint(string s)
override ConnectionEndPoint Deveel.Data.Protocol.TcpClientConnector.MakeEndPoint |
( |
IDictionary< string, object > |
properties | ) |
|
|
inlinevirtual |
Implements Deveel.Data.Protocol.NetworkClientConnector.
Definition at line 31 of file TcpClientConnector.cs.
32 object hostObj, portObj;
33 if (!properties.TryGetValue(
"Host", out hostObj))
34 throw new InvalidOperationException(
"Could not find the host address.");
36 var host = (string) hostObj;
39 if (properties.TryGetValue(
"Port", out portObj))
42 var address =
new StringBuilder(host);
44 address.AppendFormat(
":{0}", port);
46 return new ConnectionEndPoint(KnownConnectionProtocols.TcpIp, address.ToString());
EndPoint Deveel.Data.Protocol.TcpClientConnector.ParseEndPoint |
( |
string |
s | ) |
|
|
inlineprivate |
Definition at line 49 of file TcpClientConnector.cs.
53 var sepIndex = address.IndexOf(
':');
55 string sPort = address.Substring(sepIndex + 1);
56 if (!Int32.TryParse(sPort, out port))
57 throw new FormatException();
59 address = address.Substring(0, sepIndex);
62 return new IPEndPoint(IPAddress.Parse(address), port);
const int Deveel.Data.Protocol.TcpClientConnector.DefaultPort = 6669 |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Protocol/TcpClientConnector.cs