udp connect -- just set the destination port & address.

This commit is contained in:
Kelvin Sherlock 2012-05-12 19:48:06 -04:00
parent 750f8ab0e5
commit 39fbb1a191
1 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#include "marignotti.h"
#include <gno/kerntool.h>
#include <errno.h>
#include <sys/socket.h>
#include <misctool.h>
#include "s16debug.h"
@ -45,6 +47,15 @@ int mconnect(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
s.i8[0], s.i8[1], s.i8[2], s.i8[3], port);
}
if (e->_TYPE == SOCK_DGRAM)
{
IncBusy();
TCPIPSetNewDestination(e->ipid, sin->sin_addr, port);
t = _toolErr;
DecBusy();
return 0;
}
// check if already connected.
IncBusy();
terr = TCPIPStatusTCP(e->ipid, &e->sr);