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
>=0 socket句柄
MR_FAILED 失败
/*mrp code*/
int32 hSoc = 0;
hSoc = mrc_socket( MR_SOCK_STREAM, MR_IPPROTO_TCP );