質問編集履歴
1
コードの一部を修正。
title
CHANGED
File without changes
|
body
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
#include <iostream>
|
17
17
|
#include <string>
|
18
18
|
|
19
|
-
#define SEVER_IP_ADDRESSE "192.168.
|
19
|
+
#define SEVER_IP_ADDRESSE "192.168.11.8"
|
20
20
|
#define SERVER_PORT 12345
|
21
21
|
|
22
22
|
#define BUFSIZE 256
|
@@ -49,13 +49,13 @@
|
|
49
49
|
server.sin_port = htons(SERVER_PORT);
|
50
50
|
server.sin_addr.S_un.S_addr = inet_addr(SEVER_IP_ADDRESSE);
|
51
51
|
|
52
|
-
// サーバーに接続
|
52
|
+
//// サーバーに接続
|
53
|
-
if ( connect(soc,(LPSOCKADDR)&server, sizeof(server)) < 0);
|
53
|
+
//if ( connect(soc,(LPSOCKADDR)&server, sizeof(server)) < 0);
|
54
|
-
{
|
54
|
+
//{
|
55
|
-
|
55
|
+
// printf("サーバーへの接続失敗です%d\n",WSAGetLastError());
|
56
|
-
|
56
|
+
// closesocket(soc);
|
57
|
-
|
57
|
+
// return -1;
|
58
|
-
}
|
58
|
+
//}
|
59
59
|
|
60
60
|
// データをサーバーに送信
|
61
61
|
while (true)
|