Re: Linux BSD style socket wrapper
- Posted by Ray Smith <smithr at IX.NET.AU> Aug 17, 2000
- 502 views
Hi Everyone, Some of you might remember me from a year or so ago when I asked some Euphoria questions on the list, I'M BACK!!!! A year ago I wanted to write a wrapper for a cross platform TCP library called TCP4U, but I had no idea how to do it and gave up dismally. I was playing with TCP4U with Visual Basic a few weeks ago and saw how easy it was to write a wrapper in VB and decided to try it in Euphoria again. I have some of the basics done and was planning to finish it in the next month or so. I had planned doing it sooner but suddenly I have been very busy building an indoor aviary for our new acquired pet Eclectus parrot so I'll be putting on my handyman cap for the next week or so, then I should be back into some Euphoria fun. I have always had an interest in sock programming and that's about the only reason I'm doing it ... just for fun. TCP4U seems like a very good library that works in Windows and Linux (plus others) and I think it has some potentional for use in Euphoria. I'm not saying use my library (if it's ever finished) over your BSD style wrapper cense, just mentioning it as a possible alternative. The only reason I mentioned it is because it is related to your project. If anyone is interested reply back. By the way things have changed quiet a bit here in Euphoria land in the last year or so. It has really progressed very nicely. The Euphoria community has always been friendly and helpful. Regards, Ray Smith >as a few of you may remember ( not many i dont think ) i told this list a while >ago that i was working on a full set of BSD style socket wrappers for the >GNU/Linux platform. Well i have once again started working on the project and i >am close to completion. > >I was just wondering whether there is still ( was there ever? ) any demand for >such a product on this list? If there is i will make sure to send a copy of it >to Rob when i am done. If not, i dont think i will bother. > >One more thing, writing the documentation for such a project is long and >tedious. I was wondering whether someone might want to help me out and write >some of routine reference with me. I have a system of doin this so all i really >need is just more man power. Here is what a sample of the routine reference >looks like: > >### leftsock routine reference ### > >listed here are all the euphoria linux ( bsd ) socket routines leftsock allows you >to use. they are all in alphabetical order and each one has a description on how >to use it in a euphoria program. > >these are the constants that will be used throught the function reference: > >sd -> socket descriptor >a -> atom >i -> integer >ci -> "C" int >ul -> "C" unsigned long int >us -> "C" unsigned short int >ui -> "C" unsigned int >ch -> "C" char >ptr -> pointer to memory >s -> generic sequence >addr_in -> sequence where { sin_family, sin_port, s_addr, sin_zero } > >//========================================================================= ==========\\ > >routine: accept >syntax: accept( ci, addr_in, ci2 ) > >description: the accept function this allows a socket server to accept connections > from clients. returns "status" where 0 = error, 1+ = clean execution > >example: > >integer status >sequence myaddr_in > >-- populate the myaddr_in sequence > >status = accept( sd, myaddr_in, sizeof( myaddr_in ) ) > >//========================================================================= ==========\\ > >thanks for any responses to this post. > >-- >cense >a member of the >ak-software development team >http://www.ak-software.com/