[Barrelfish-users] How to create a TCP server

Chothia Zaheer zchothia at student.ethz.ch
Mon Apr 1 12:22:20 CEST 2013


Hi Mingyu,

After initialization, do you also start the network polling thread which dispatches events in a loop?

For comparison, a small TCP server is attached which works with the latest release (2013-03-22).
Compile and link with posixcompat, then connect from another machine and you should see the time:

$ netcat 10.110.5.25 5000
The time is Mon Apr 25 11:54:54 2011

Best,

--Zaheer

From: 郭明宇 [mailto:1101210651 at pub.ss.pku.edu.cn] 
Sent: 01 April 2013 11:41
To: barrelfish-users
Cc: 沈晴霓老师; 张甜
Subject: [Barrelfish-users] How to create a TCP server

Dear, everyone:

I am new to Barrelfish. I have tried to write a very simple TCP server on barrelfish but failed.
The routine used lwip_init_auto to init the network, but it crashed when it call "accept", with error:
Assertion "netconn_accept: invalid acceptmbox" failed at line 312 in ../lib/lwip/src/api/api_lib.c

Then I replaced lwip_init_auto with tcp_init and lwip_socket_init, and it blocked at "accept". However, when I use a client to connect it, nothing happened.

I do not know where is the problem. On Barrelfish release2012-08-08.

Thanks very much,
By Mingyu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sockets_time_server.c
Url: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20130401/dc5e614c/attachment.c 


More information about the Barrelfish-users mailing list