TX Library Help – Version: 00173a, Revision: 174
 ALL  Windows graphics in a sandbox

Example00/client.cpp

См. документацию.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 // client.cpp
00017 
00018 #include "proto.h"
00019 
00020 #define SERVER_IP "localhost" //IP адрес писать здесь.
00021 
00022 int main()
00023 {
00024 txCreateWindow (1024, 768);
00025 
00026 printf ("Searching for server...\n");
00027 TX_SOCKET client = txCreateSocket (TX_CLIENT, SERVER_IP);
00028 
00029 char str[Message_size] = "";
00030 
00031 txRecvFrom (client, str, Message_size);
00032 printf ("in: %s\nout: ", str);
00033 
00034 scanf ("%s", str);
00035 txSendTo (client, str, Message_size);
00036 
00037 return 0;
00038 }