SKYENGINE API  参考手册返回目录  

 

int32 mr_socket(int32 type, int32 protocol)



Description
创建一个socket。
Parameters

Name Description
type Socket类型:
MR_SOCK_STREAM
MR_SOCK_DGRAM
protocol 具体协议类型:
MR_IPPROTO_TCP,
MR_IPPROTO_UDP

Return Value

>=0                          socket句柄
MR_FAILED                 失败

Remarks

 

Example

/*mrp code*/

int32 hSoc = 0;

hSoc = mrc_socket( MR_SOCK_STREAM, MR_IPPROTO_TCP );

See Also

mr_closeSocket


Copyright ?2005-20010 SKY-MOBI

返回目录