[uae] Re: I wrote the horrible bsdsocket stuff

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 1 Apr 2004 14:58:20 -0500

Hi Carl

Nice of you to drop in!

On Wednesday 31 March 2004 02:26 am, Carl Drougge wrote:
> ..and I wish someone had told me sooner that people were still using it.
> (And also that people were using the latest version, even if it isn't much
> different. That one is probably my fault though, because it seems all
> information of its existance has fallen off the net..)
> (Please don't kill me over how horrible it is, it's pretty much the first
> thing I wrote in C..)

It isn't very pretty, admittedly, but it works (more or less). ;-)

It's certainly the best solution we have at the moment.

> Anyway, I'm planning to see if it can be fixed, or maybe, just maybe,
> rewrite it. (I don't have much faith in the windows version, last time I
> looked at it it was very windows specific indeed. Admittedly this was four
> years ago..)

I had a go fixing a couple of things. And I tried to remove the dependency on 
pthreads (and use  whatever thread layer UAE is using instead). That still 
has problems, because I haven't done the signal handling - so aborting a 
socket doesn't work for instance.

I have considered porting the windows version, but while that would be the 
best solution for maintainability - I'm not convinced it would be technically 
the best solution. The stack magic code that the win32 version relies on to 
call Amiga code would cause all kinds of portability problems, IMHO. I think 
it's a better idea to handle more of the work in the bsdsocket.library 
wrapper itself as you have done in your version. (BTW, I've been meaning to 
re-write that in C, since I don't have an E compiler, but haven't got around 
to it yet).


Other related posts: