Re: Introduction

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Thu, 28 Apr 2005 13:50:33 +0200

Hi Evgeny,

At 13.07 28/04/2005, Evgeny Kotsuba wrote:

>On Thu, 28 Apr 2005 02:46:46 +0400
> Andrey Shorin <tolsty@tushino.com> wrote:
>>Hello Serassio,
>>Tuesday, April 26, 2005, 13:08:09, Serassio Guido wrote:
>>
>>>>Now I plan to port diskd filesystem to Windows.
>>SG> They are currently some Squid aspect that needs more work in the Windows
>>SG> port. some of they could be integrated in Squid 3.0, in priority
>>order they
>>SG> are:
>>SG> - Integration of Windows and Unix IPC models (partially done from
>>Robert, a
>>SG> blocker for complete Squid 3.0 integration)
>>Could you please be more specific on this?
>>SG> - Override the 2048 FD limit
>>Unmortunately, I forgot already what is the case of this limit...
>>SG> and native socket handling (could go in 3.1)
>>Do you mean getting rid of such macros:
>>#define read(fd,buf,siz) \
>> (_so_err_siz = sizeof(_so_err), \
>> getsockopt((fd),SOL_SOCKET,SO_ERROR,&_so_err,&_so_err_siz) \
>> == 0 ? recv((fd),(buf),(siz),0) : _read((fd),(buf),(siz)))
>>I see there is already 'type' member in struct _fde and FD_SOCKET
>>enum constant. We could do something like this:
>>#define read _w32_read
>>int _w32_read(int fd, char* buf, int siz)
>>{
>> switch (fd_table[fd].type) {
>> case FD_FILE:
>> return _read(fd, buf, siz);
>> case FD_SOCKET:
>> return recv(fd, buf, siz, 0);
>> ...
>> }
>>}
>
>This is right what I do in my OS/2 port of squid

FD_READ_METHOD/FD_WRITE_METHOD macros should be more efficient.
Look here:

http://cvs.sourceforge.net/viewcvs.py/squid/squid/src/fd.c?rev=1.7.16.9&only_with_tag=nt-2_5&view=auto

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Thu Apr 28 2005 - 10:00:31 MDT

This archive was generated by hypermail pre-2.1.9 : Sun May 01 2005 - 12:00:06 MDT