Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TcpClient() [4/5]

System.Net.Sockets.TcpClient.TcpClient ( string hostname,
int port )
inline

Definition at line 177 of file TcpClient.cs.

178 {
179 if (System.Net.NetEventSource.Log.IsEnabled())
180 {
181 System.Net.NetEventSource.Info(this, hostname, ".ctor");
182 }
183 if (hostname == null)
184 {
185 throw new ArgumentNullException("hostname");
186 }
188 {
189 throw new ArgumentOutOfRangeException("port");
190 }
191 _family = AddressFamily.Unknown;
192 try
193 {
194 Connect(hostname, port);
195 }
196 catch
197 {
199 throw;
200 }
201 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static bool ValidatePortNumber(int port)

References System.Net.Sockets.TcpClient._clientSocket, System.Net.Sockets.TcpClient._family, System.Net.Sockets.Socket.Close(), System.Net.Sockets.Connect, System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, and System.Net.TcpValidationHelpers.ValidatePortNumber().