Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Writing output to and receiving output on a socket

Hello,

I've been given a task by my teammates involving SUMO. I need to figure out how to write information to a socket instead of a file. In pursuit of that goal, here's the command line I used.

"sumo -c hello.sumocfg ---netstate-dump localhost:1338"

Now that throws an error

"Error: tcpip::Socket::connect() @ connect: Socket refused (host: locahost, port: 1338)
Qutting (on error).:

So my first problem is that I'm obviously not writing to the socket. I don't know if that's because it's not being given something to connect with, ie there's no listener on that socket. If that's the case, please let me know.

My second problem is that I don't know how to write something that listens on that socket and receives the data. To start off with, I would just like to write to a console all the information that it receives, that way I know it's receiving it. I don't know if asking for help on this is outside the scope of this mailing list, but if you have the time, any help would be appreciated.

Thanks,

Peter Marchione

Back to the top