Hello,

I am trying to develop a simple client application using UDP(card
reader). There are two tasks,
the first waits on data from reader and sends to server, the latter
waits on data that represents e.g. ACK, status messages, etc.

Task1  - if(card != 0) netconn_sendto()
Task2 - data = netconn_recv (); process_data(data);

Unfortunately the server checks UDP source port. My problem is that I
have to bind netconn twice to the same local port to achieve server's
requirements. Task1 will never read data from netconn.

<code>
struct netconn * sendUDPNetConn;
struct netbuf * testUDPNetConn;

sendUDPNetConn = netconn_new( NETCONN_UDP );    
errLWIP = netconn_bind(sendUDPNetConn, IP_ADDR_ANY, 0x4321);

testUDPNetConn = netconn_new( NETCONN_UDP );    
netconn_bind(testUDPNetConn, IP_ADDR_ANY, 0x4321);
</code>

Will this configuration run without problems?

Thank you for your reply

Regards,
Martin Velek


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to