10054.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 23 行

HTML
23
字号
<html>
  <head>
    <title>Re: Some problem of winsock</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: Some problem of winsock</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:maxwell@email.gcn.net.tw">Maxwell</a> on February 11, 1999 at 03:55:37:<p>
In Reply to: <a href="9951.html">Some problem of winsock</a> posted by Tony on February 08, 1999 at 21:55:35:<p>
: Hi , all<br>: i've written a program of client/server with Winsock control. <br>: surely, I've make the server listen and accept request ,and the client had set up the server's IP and port. <p>: first time I clicked the "command1" button , but next time when i push the button again , an error occured<br>: "Address in used"<br>: ???<br>: Thanks, you can answer this question in Chinese or English..<br>:  <p>: <br>: Private Sub Command1_Click()<br>: TCPClient.Connect<br>: End Sub<p>: Private Sub Form_Load()<br>: TCPClient.RemoteHost = "127.0.0.1"<br>: TCPClient.RemotePort = 2404<br>:  <p>: End Sub<p>: Private Sub TCPClient_Connect()<p>: TCPClient.SendData txtSend.Text<br>: MsgBox "sent"<p>: End Sub<p>: Private Sub TCPClient_DataArrival(ByVal bytesTotal As Long)<br>: Dim strData As String<br>: TCPClient.GetData strData<br>: txtOutput.Text = strData<p><br>: End Sub<p>: Private Sub TCPClient_SendComplete()<br>: TCPClient.Close<br>: frmSendMsg.Hide<p>: <br>: End Sub<p>&#25033;&#35442;&#22312; FORM_LOAD &#30340;&#22320;&#26041;&#20877;&#21152;&#19968;&#34892;:<br>TCPClient.LocalPort = 0<br>&#22914;&#27492;&#25165;&#26371;&#33258;&#21205; assign port &#32102; remote host
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 10054-->
</ul><!--end: 10054-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?