lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] netconn_x API, Creating a TCP client fails


From: Sägesser Walter
Subject: [lwip-users] netconn_x API, Creating a TCP client fails
Date: Tue, 9 Mar 2010 10:41:09 +0100

I have succeeded in setting up a server application using either the Raw API or the netconn_x API. But I also need a TCP client on the device, able to send state information to a server app on a PC.
I have

struct netconn * xNetConn = netconn_new ( NETCONN_TCP );  xAddr.addr = M_IpAddrEncode ( 192, 168, 142, 52 );

// xNetConn->recv_timeout = 100;

Int32 xRes = netconn_bind ( xNetConn, &xAddr, 9000 );

while ( true )

{

RTOS_TaskSleep ( cT1s );

xRes = netconn_connect ( xNetConn, &xAddr, 9000 );

if ( xRes == ERR_OK )

netconn_write ( xNetConn, "Ein Comm String", 16, NETCONN_NOCOPY );

}

} // procedure ExTaskEthClient

 
 

Freundliche Grüsse / Kind regards

Walter Sägesser

_____________________________

SOLON Inverters AG
Burgerfeldstrasse 19
CH-8730 Uznach SG, Schweiz

Phone: +41 55 246 41 14
Direct: 
+41 55 246 58 52
Fax:    
+41 55 246 41 16
www.solon.com

 

 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]