Building an RFC 1086 simulator using ithreads
Building an RFC 1086 simulator using ithreads
Par Philip Newton (pne) de London.pm Date : jeudi 24 juillet 2003 15h10
Durée : 20 minutes Langue :
At work, we wanted to change over an application written in C++ (and
some C) to from an X.25 connection to one running over an RFC 1086
device (TCP-to-X.25 bridge). Since we weren't sure which hardware
would be going to be used, I had to write a simulator in software in
order to test my code.
RFC 1086 connections need three TCP/IP connections, so the simulator
had to handle multiple connections simultaneously. I did not
particularly want to fiddle around with select(), and fork() would be
difficult, too, since the connections have to share data shortly after
startup, which would mean IPC, which I wasn't too keen on, either.
Then I thought about whether I could do this with Perl, and I
remembered ithreads. I recompiled Perl with ithreads enabled, had a
look through the documentation, and off I went, using shared scalars
and queues to share data and semaphores to control access to STDOUT
(for logging)!
This talk will explain how I did it.
Dernière modification du patron talk/show à 12:26:25 27-Jul-2013
Le contenu de ce site est copyright © 2003 Yet Another Society, Inc.
Pour toute question concernant ce site ou YAPC::EU 2003, écrivez à < yapc-help@mongueurs.net>.
Validations XHTML et
CSS.
|