bug med reference på typecast
This commit is contained in:
parent
c5e432b566
commit
9e6593abd1
|
@ -29,7 +29,7 @@ int main()
|
||||||
Client client;
|
Client client;
|
||||||
|
|
||||||
//Connect to server
|
//Connect to server
|
||||||
client.Connect(9876, "127.0.0.1");
|
client.Connect(9876, "10.0.0.3");
|
||||||
|
|
||||||
chat(client);
|
chat(client);
|
||||||
|
|
||||||
|
@ -79,20 +79,12 @@ void chat(Client client)
|
||||||
case package_type_header:
|
case package_type_header:
|
||||||
break;
|
break;
|
||||||
case package_type_test:
|
case package_type_test:
|
||||||
cout <<"Client 2: " <<((ProtocolTest*)&header)->textMessage <<endl;
|
cout <<"Client 2: " <<((ProtocolTest*)header)->textMessage <<endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::getline(std::cin, msgSend);
|
std::getline(std::cin, msgSend);
|
||||||
std::cin.clear();
|
|
||||||
|
|
||||||
if(msgSend.length() < 1)
|
|
||||||
{
|
|
||||||
//memcpy(msgSend, " " , 1);
|
|
||||||
msgSend = " ";
|
|
||||||
//strcpy_s((char)msgSend , " ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if( msgSend != "exit")
|
if( msgSend != "exit")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue