how to create more sockets then 1 in mbed??

12 Nov 2010

i got a working HTTP server now, but it seems that the stack is only 1 sock

used the telnet example see below.

If anyone has a hint?

void InitTCP(void) {


ListeningSock.setOnEvent(&onListeningTCPSocketEvent);

// bind and listen on TCP
err=ListeningSock.bind(Host(IpAddr(), TCP_LISTENING_PORT));
printf("Binding..\r\n");
if (err) {
//Deal with that error...
printf("Binding Error\n");
}
err=ListeningSock.listen(); // Starts listening
printf("Listening...\r\n");
if (err) {
printf("Listening Error\r\n");
}