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

◆ Connect() [2/4]

void System.Net.Sockets.Socket.Connect ( IPAddress address,
int port )
inline

Definition at line 1247 of file Socket.cs.

1248 {
1250 if (address == null)
1251 {
1252 throw new ArgumentNullException("address");
1253 }
1255 {
1256 throw new ArgumentOutOfRangeException("port");
1257 }
1258 if (_isConnected)
1259 {
1260 throw new SocketException(10056);
1261 }
1262 if (!CanTryAddressFamily(address.AddressFamily))
1263 {
1264 throw new NotSupportedException(System.SR.net_invalidversion);
1265 }
1266 IPEndPoint remoteEP = new IPEndPoint(address, port);
1268 }
bool CanTryAddressFamily(AddressFamily family)
Definition Socket.cs:1159
static bool ValidatePortNumber(int port)
static string net_invalidversion
Definition SR.cs:16
Definition SR.cs:7

References System.Net.Sockets.Socket._isConnected, System.Net.IPAddress.AddressFamily, System.Net.Sockets.Socket.CanTryAddressFamily(), System.Net.Sockets.Connect, System.SR.net_invalidversion, System.Net.Sockets.Socket.ThrowIfDisposed(), and System.Net.TcpValidationHelpers.ValidatePortNumber().