NetHelper.Connect Method

HD.Common

NetHelperConnect Method Helper帮助文档
连接到基于TCP协议的服务器,连接成功返回true,否则返回false

Namespace: HD.Common
Assembly: HD.Common (in HD.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static bool Connect(
	Socket socket,
	string ip,
	int port
)
Public Shared Function Connect ( 
	socket As Socket,
	ip As String,
	port As Integer
) As Boolean
public:
static bool Connect(
	Socket^ socket, 
	String^ ip, 
	int port
)
static member Connect : 
        socket : Socket * 
        ip : string * 
        port : int -> bool 

Parameters

socket
Type: System.Net.SocketsSocket
Socket对象
ip
Type: SystemString
服务器IP地址
port
Type: SystemInt32
服务器端口号

Return Value

Type: Boolean

[Missing <returns> documentation for "M:HD.Common.NetHelper.Connect(System.Net.Sockets.Socket,System.String,System.Int32)"]

See Also

Reference