Hi Gayathri,
My Server and Client application are Windows based. Also the application
is huge, so its not possible to rewrite at this time. Maybe later we can do
that, but as for now, we are looking into alternate method for this. If we
decide to revisit this issue then i will look into this.
Hi Eric.,
First of all i am a she :) and I took a maternity break off from
work..which is why I am jobless..but busy feeding and diapering my
little one :)..sure I can take up your offer, please email me at
suraj...@gmail.com.
harsh.,
The thing is as Eric says, you really have to rewrite ur serv
On 5/9/2011 1:45 PM, Eric S. Eberhard wrote:
> int setblock(fd, mode)
> int fd;
> int mode; /* True - blocking, False - non blocking */
> {
> int flags;
> int prevmode;
>
> flags = fcntl(fd, F_GETFL, 0);
> prevmode = !(flags & O_NDELAY);
> if (mode)
> flags &= ~O_NDELAY; /* turn blocking on */
>
Harsh,
I would take up his offer of help. Socket control over multiple
sockets is tricky code and very specific to what you are trying to
do. My environment is single threaded and does similar things to
yours -- but as Gayathri said, there are many details and exceptions
and although with s
On 5/9/2011 6:27 AM, Harshvir Sidhu wrote:
Also i suspect, that if i change the socket to non blocking, then
my current read write code will not work. i mean the one in which i use
FD_SET and select to perform operations.
Thanks.
It's very easy to get things wrong and it won't work unless
Hi.,
Yes, once you make the socket noblocking, your current ssl API,s will
not work. that is why I asked you to write the asynchronous state
machine. Go thro the man pages for ssl accept, ssl read, ssl write for
non blocking cases. You need to handle special cases called want read
and write errors
Hi,
I used the following code to change the socket to non blocking, but its
still not successful, now its not even able to complete SSL_Accept. I am
changing the socket option for the accepted socket.
unsigned long iMode = 1;
int nReturn = ioctlsocket(sock, FIONBIO, &iMode);
Harsh.,
If u have any specific doubts in writing this asynchronous state
machine email me privately at suraj...@gmail.com.
I am pretty much jobless right now and can spend some time on this.
Thanks
--Gayathri
On Friday, May 6, 2011, Harshvir Sidhu wrote:
> Thanks, I will give this a try.
> //
Thanks, I will give this a try.
// Harshvir
On Fri, May 6, 2011 at 6:44 PM, Eric S. Eberhard wrote:
> Change the sockets. This is what I use:
>
> int setblock(fd, mode)
> int fd;
> int mode; /* True - blocking, False - non blocking */
> {
>int flags;
>int
Yes, you need to make the underlying socket non blocking, and at the
same time gotta change the way you call SSL_accept, SSL_read, write
etc to handle non block error conditions like want_read, want_write
errors, use the code Eric has given to make the fd non block, or u can
also set the bio non bl
Change the sockets. This is what I use:
int setblock(fd, mode)
int fd;
int mode; /* True - blocking, False - non blocking */
{
int flags;
int prevmode;
flags = fcntl(fd, F_GETFL, 0);
prevmode = !(flags & O_NDELAY);
if (mode)
Thanks for the reply Gayathri.
Do you mean to changing the sockets to non blocking, or when i create bio
for ssl to make that as non blocking?
Thanks.
On Fri, May 6, 2011 at 6:03 PM, Gayathri Sundar wrote:
> Harsh,
>
> Okay from what I can understand, if you make ur underlying fd non blocking
>
And I cannot imagine a case where a blocking FD is useful except it
is lazier to code that way. You need to use non-blocking. E
At 04:03 PM 5/6/2011, you wrote:
Harsh,
Okay from what I can understand, if you make ur underlying fd non
blocking then it would work fine. Blocking FDs, unless and
Harsh,
Okay from what I can understand, if you make ur underlying fd non blocking
then it would work fine. Blocking FDs, unless and until one client is
finished with its processing the other client will not be able to
communicate with the server as the previous fd is blocked. The server is
waiting
Gayatri,
My server code is single threaded and i am using blocking sockets, i am
using fd_set and select to wait for event on socket, and then performing
operation based on the event that acts on a socket.
I have an array of sockets to listen. So if i start listening on 3 different
ports and from m
Harshvir,
SO_REUSEADDR sock option has noting to do with ur problem, please go thro
the socket ops man page to get a better understanding. First find out if ur
server code is a blocking i/o or non blocking I/O..if former then
connections will be handled sequentially..only after the 1st client is
f
Well i think this link is for my question.
I have already done 1-5 from the Before you ask list.
Number 6, i dont know anyone who use openssl.
Number 7, it will take a lot of time to go through all the code, i was just
trying to save some time. I thought user discussion forums are for this
only. I
From: Harshvir Sidhu
Hi,
I have a server application, which accepts normal sockets and ssl socket
connections. I am trying to make 3 connections to server from 1 client machine,
on same server port.
When i connect on normal sockets then it works with any number of
connections.
When
On Fri May 6 2011, derleader mail wrote:
> Hi,
>
>
> I have a server application, which accepts normal sockets and ssl socket
> connections.
> I am trying to make 3 connections to server from 1 client machine, on same
> server port.
>
> When i connect on normal sockets then it works w
My code is all jumbled up, its a big big code. I dont think i can share the
code.
If there is some particular call that you want to see, please let me know i
will share the function call or block of calls.
Thanks.
On Fri, May 6, 2011 at 2:22 PM, derleader mail wrote:
> Hi,
>
>I have a ser
Hi,
I have a server application, which accepts normal sockets and ssl socket
connections.
I am trying to make 3 connections to server from 1 client machine, on same
server port.
When i connect on normal sockets then it works with any number of connections.
When i tried to connect
Hi,
I have a server application, which accepts normal sockets and ssl socket
connections. I am trying to make 3 connections to server from 1 client
machine, on same server port.
When i connect on normal sockets then it works with any number of
connections.
When i tried to connect SSL then
22 matches
Mail list logo