|
库函数命令中有此命令,说明如下:
% y/ P" r3 v/ z g. q6 R# H clientsend(num socket,str message)
1 H. I2 p a# }8 ], ]2 x4 O 说明:此命令将信息从一个端口传递到指定的端口。5 @2 E& Z0 Q) Q/ t5 U
) x2 U8 \ H2 M) a) i/ Y
查了帮助的命令集,描述如下:
( Y1 |) q9 }- }- W6 S clientsend(num socket, str message[, num charlength]) # ^2 Y1 N; P& R `* B, |
Description:" Y& R8 o; r& N/ O" J- V8 i
This command sends a message across the socket specified as socket. The value passed as socket is the number returned by clientcreate(). The charlength is the length of the string being passed and is usually optional. Needed only if the string being sent has NULL characters in it.
% s9 J0 \# E1 n$ L Example:
; d* E& u: f' Q3 h% _1 P9 ] clientsend(1,"REQ:service");, e/ Z* v: R% O) e( @6 R1 R
z0 A$ P4 h! u; m! N$ |. }7 U
- M5 M" n$ {4 b5 J) L% C想请问一下举例中clientsend(1,"REQ:service");/ x5 C4 {% a. S! D+ m% f8 Y
& x' i" Y0 L( _" i( ]
问题1: 从端口1发送字符串"REQ:service",还是发送给端口1?' o$ X0 M7 W# e$ B$ M/ R: [. b
$ V: r' }- M) S4 c6 O& s+ w
问题2: 此端口指哪个端口?调试时可以在哪里看到结果?
0 W1 b5 L! U# d# n6 R/ }. N
" R ?' N9 R# D D1 D; s- F( u" w拜托各位高手给与指点 |
|