...
This commit is contained in:
parent
c121c38912
commit
b89c4096a5
2 changed files with 8 additions and 8 deletions
|
@ -9,9 +9,9 @@ int cli_sendBuffer(Client* cli,void* pBuffer, unsigned int bufferlen)
|
|||
int iResult;
|
||||
ClientEventArgs e;
|
||||
//abfragen ob client existiert!! wichtig
|
||||
// if (cli->sSocket != SOCKET_ERROR)
|
||||
// {
|
||||
iResult= send(cli->sSocket,(char*)pBuffer,bufferlen,0);
|
||||
if (cli->sSocket != SOCKET_ERROR)
|
||||
{
|
||||
iResult= send(cli->sSocket,(char*)pBuffer,bufferlen,0);
|
||||
if (cli->_OnWrite != 0)
|
||||
{
|
||||
e.dwLen = iResult;
|
||||
|
@ -19,9 +19,9 @@ int cli_sendBuffer(Client* cli,void* pBuffer, unsigned int bufferlen)
|
|||
cli->_OnWrite(&e);
|
||||
}
|
||||
return iResult;
|
||||
// }
|
||||
// else
|
||||
// return -3;
|
||||
}
|
||||
else
|
||||
return -3;
|
||||
}
|
||||
|
||||
int cli_ConnectTo(Client* cli,char * pAdresse,unsigned short Port,int webAdresse)
|
||||
|
|
|
@ -326,7 +326,7 @@ void* client_task(void* e)
|
|||
|
||||
while (err)
|
||||
{
|
||||
err = cli_ConnectTo(&cli,"192.168.0.1",5555,0);
|
||||
err = cli_ConnectTo(&cli,"192.168.0.2",5555,0);
|
||||
SHELLDEBUGPRINTF("retry connect err = %d socket: %d\n",err,cli.sSocket);
|
||||
}
|
||||
SHELLDEBUGPRINTF("connected\n");
|
||||
|
@ -423,7 +423,7 @@ int test_init(void)
|
|||
sleep(10);
|
||||
SHELLDEBUGPRINTF("hello World! I AM CORE NO. %d =) \n",RCCE_ue());
|
||||
|
||||
if (!RCCE_ue())
|
||||
if (RCCE_ue())
|
||||
create_kernel_task(NULL,server_task,NULL);
|
||||
else
|
||||
create_kernel_task(NULL,client_task,NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue