...
This commit is contained in:
parent
3e8b2b1808
commit
1b710d63df
2 changed files with 5 additions and 4 deletions
|
@ -877,6 +877,7 @@ err_t mmnif_init(struct netif* netif)
|
|||
#endif
|
||||
return ERR_MEM;
|
||||
}
|
||||
mmnif->tx_queue = 0;
|
||||
memset(mmnif->tx_buff[0], 0, MMNIF_TX_QUEUELEN * MMNIF_TX_BUFFERLEN);
|
||||
|
||||
for (i = 0; i < MMNIF_TX_QUEUELEN -1 ; i++)
|
||||
|
|
|
@ -224,26 +224,26 @@ void* client_task(void* e)
|
|||
|
||||
/* grab an Internet domain socket */
|
||||
if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
||||
kprintf("socket");
|
||||
kprintf("socketfail");
|
||||
return;
|
||||
}
|
||||
|
||||
kprintf("connecting");
|
||||
/* connect to PORT on HOST */
|
||||
if (connect(sd,(struct sockaddr *) &pin, sizeof(pin)) == -1) {
|
||||
kprintf("connect");
|
||||
kprintf("connectfail");
|
||||
return;
|
||||
}
|
||||
kprintf("sending");
|
||||
/* send a message to the server PORT on machine HOST */
|
||||
if (send(sd, "HELLO THERE", strlen("HELLO THERE"), 0) == -1) {
|
||||
kprintf("send");
|
||||
kprintf("sendfail");
|
||||
return;
|
||||
}
|
||||
kprintf("recieving");
|
||||
/* wait for a message to come back from the server */
|
||||
if (recv(sd, dir, 256, 0) == -1) {
|
||||
kprintf("recv");
|
||||
kprintf("recvfail");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue