--- a/drivers/can_tcp_win32/can_tcp_win32.cpp Tue Mar 05 20:08:37 2013 +0900
+++ b/drivers/can_tcp_win32/can_tcp_win32.cpp Wed Mar 06 11:32:27 2013 +0900
@@ -91,10 +91,11 @@
{
Socket* s;
try {
- s = new SocketClient(board->busname, 11898);
-
- //s.SendLine("GET / HTTP/1.0");
- //s.SendLine("Host: www.google.com");
+ char *dst = "127.0.0.1";
+ if(strlen(board->busname)){
+ dst=board->busname;
+ }
+ s = new SocketClient(dst, 11898);
}
catch (const char* _s) {
cerr << _s << endl;
--- a/drivers/can_tcp_win32/can_tcp_win32_server.cpp Tue Mar 05 20:08:37 2013 +0900
+++ b/drivers/can_tcp_win32/can_tcp_win32_server.cpp Wed Mar 06 11:32:27 2013 +0900
@@ -38,12 +38,11 @@
g_connections.push_back(s);
- //s->SendLine("Welcome to the Message Distributor");
printf("Accepted new connection (0x%x).\n");
while (1) {
std::string r = s->ReceiveLine();
if (r.empty()) break;
- //cout << r << endl;
+ cout << r << endl;
for (socket_list::iterator os =g_connections.begin();
os!=g_connections.end();
os++) {