On Sat, Apr 27, 2013 at 03:09:10PM +0800, liu ping fan wrote:
> On Fri, Apr 26, 2013 at 5:48 PM, Stefan Hajnoczi wrote:
> > On Fri, Apr 26, 2013 at 10:47:26AM +0800, Liu Ping Fan wrote:
> >> @@ -141,6 +134,59 @@ static ssize_t
> >> net_socket_receive_dgram(NetClientState *nc, const uint8_t *buf,
On Fri, Apr 26, 2013 at 5:48 PM, Stefan Hajnoczi wrote:
> On Fri, Apr 26, 2013 at 10:47:26AM +0800, Liu Ping Fan wrote:
>> @@ -141,6 +134,59 @@ static ssize_t net_socket_receive_dgram(NetClientState
>> *nc, const uint8_t *buf,
>> return ret;
>> }
>>
>> +static gushort socket_connecting_read
On Fri, Apr 26, 2013 at 10:47:26AM +0800, Liu Ping Fan wrote:
> @@ -141,6 +134,59 @@ static ssize_t net_socket_receive_dgram(NetClientState
> *nc, const uint8_t *buf,
> return ret;
> }
>
> +static gushort socket_connecting_readable(void *opaque)
> +{
> +return G_IO_IN;
> +}
> +
> +stat
From: Liu Ping Fan
Port NetSocketState onto NetClientSource. The only thing specail is that
owning to the socket's state machine changes, we need to change the handler.
We implement that by destroy the old NetClientSource and attach a new one
with NetSocketState.
Signed-off-by: Liu Ping Fan
---