xsocket-develop Mailing List for xsocket (Page 5)
Status: Inactive
Brought to you by:
grro
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
(9) |
Nov
(11) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(8) |
Feb
(9) |
Mar
(9) |
Apr
(22) |
May
(28) |
Jun
(17) |
Jul
(10) |
Aug
(19) |
Sep
(4) |
Oct
(14) |
Nov
(26) |
Dec
(25) |
| 2009 |
Jan
(13) |
Feb
(17) |
Mar
(12) |
Apr
(4) |
May
(16) |
Jun
(6) |
Jul
(10) |
Aug
(24) |
Sep
(6) |
Oct
(5) |
Nov
(13) |
Dec
(10) |
| 2010 |
Jan
(17) |
Feb
(21) |
Mar
(10) |
Apr
(8) |
May
(2) |
Jun
(14) |
Jul
(7) |
Aug
(10) |
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(5) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: Kevin B. <kev...@go...> - 2010-02-21 08:01:38
|
Hello Gregor, Actually I'm not thoroughly conversant with NIO architecture what do these internal dispatchers do? You say that each open connection allocates system resources and memory and also do each running thread. How does xSocket deal with clients, is each client handled in his own thread that means if 100 clients are connected will 100 threads be generated. Also what are open connections, is 100 clients = 100 open connections. The OS is Centos 5.2 based on this can I calculate the amount of memory that will be used up if 100 clients have active connections made to xSocket. Regards, Kevin On 2/20/2010 1:18 PM, Gregor Roth wrote: > > Hi Kevin, > > I would suggest setting the timeouts. By default the timeouts are very > high. > > Regarding to the memory, by xSocket uses 2 internal dispatchers by > default. By default each dispatcher will preallocate 65536 bytes non > direct memory (see system propery > org.xsocket.connection.client.readbuffer.preallocation.size). This > preallocated buffer will be used to read the network data. Each open > connection allocates (OS) system resources and memory. This depends on > the OS. Further more each running thread also allocates a predefined > amount of memory. This also depends on the OS. > > Gregor > > >> ----- Original Message ----- >> >> From: Kevin Boyd >> >> Sent: 02/19/10 09:47 AM >> >> To: xso...@li... >> >> Subject: [xSocket-develop] production level socket server pitfalls >> >> Hello, >> >> For a production level socket server what are the potential pitfalls >> that I have to consider : >> >> 1. I have started the server as per the tutorial on the homepage using >> >> >> IServer srv = new Server(8090, new TestHandler()); >> srv.run(); >> >> 2. The TestHandler class implements the following interfaces >> IDataHandler, IConnectHandler, IDisconnectHandler, >> IIdleTimeoutHandler, IConnectionTimeoutHandler. >> >> 3. I haven't set any "System Properties" as yet and >> "FlushMode.ASYNC" is not set. >> 4. Connection and Idle timeout's are set to default. >> >> >> I have uploaded this to my VPS host. However before letting it loose >> in production I wanted to test it for reliability and scalabity. Any >> suggestions here would be welcome. >> >> Memory is another aspect , My VPS host has allotted me 1GB ram with >> around 8GB burst capability, is this sufficient. (As of now I have >> only 500MB free) >> My clients would be continuously connected to the server 24x7, how >> much resource would each client connection take up in terms of ram, >> if 1000 or more clients would be connected how do I compute the >> amount of ram that would be necessary to safely run the socket server. >> >> Please suggest other points that I have missed out here. >> >> Regards, >> Kevin >> >> |
|
From: Gregor R. <gre...@gm...> - 2010-02-20 07:48:31
|
Hi Kevin,
I would suggest setting the timeouts. By default the timeouts are very high.
Regarding to the memory, by xSocket uses 2 internal dispatchers by default. By default each dispatcher will preallocate 65536 bytes non direct memory (see system propery org.xsocket.connection.client.readbuffer.preallocation.size). This preallocated buffer will be used to read the network data. Each open connection allocates (OS) system resources and memory. This depends on the OS. Further more each running thread also allocates a predefined amount of memory. This also depends on the OS.
Gregor
----- Original Message -----
From: Kevin Boyd
Sent: 02/19/10 09:47 AM
To: xso...@li...
Subject: [xSocket-develop] production level socket server pitfalls
Hello,
For a production level socket server what are the potential pitfalls that I have to consider :
I have started the server as per the tutorial on the homepage using
IServer srv = new Server(8090, new TestHandler());
srv.run();
The TestHandler class implements the following interfacesIDataHandler, IConnectHandler, IDisconnectHandler, IIdleTimeoutHandler, IConnectionTimeoutHandler.
*
I haven'tset any "System Properties" as yet and "FlushMode.ASYNC" is not set. *
Connection and Idle timeout'sare set to default.
I have uploaded this to my VPS host. However before letting it loose in production I wanted to test it for reliability and scalabity. Any suggestions here would be welcome.
Memory is another aspect , My VPS host has allotted me 1GB ram with around 8GB burst capability, is this sufficient. (As of now I have only 500MB free)
My clientswould be continuously connected to the server 24x7, how much resource would each client connection take up in terms of ram, if 1000 or more clients would be connected how do I compute the amount of ram that would be necessary to safely run the socket server.
Please suggest other points that I have missed out here.
Regards,
Kevin
|
|
From: Gregor R. <gre...@gm...> - 2010-02-20 07:36:30
|
Hi,
the ConnectionUtils.registerMBean() implementation supports reading and writing properties only. Performing other methods such as getter or setter is not supported currently.
Gregor
----- Original Message -----
From: e-m...@we...
Sent: 02/19/10 09:27 AM
To: xso...@li...
Subject: [xSocket-develop] ConnectionUtils.registerMBean()
Hello together,
i hope anyone can help me. I have a problem with using the registerMBean method.
If i register an IServer i can see (with the jconsole) any attributes (get method), but i can not see/use an operation.
My task is to find a way for closing a thread with using the jconsole ore an other tool.
Thanks for any help!!!
My Quellcode:
public class ServiceServer {
public static void main(String args[]) throws Exception {
// creates the server by passing over the port number & handler
IServer srv = new Server(8091, new ServiceHandler());
// 08.07.2009: JMX-Registrierung
ConnectionUtils.registerMBean(srv);
// run it within the current thread.
srv.run(); // the call will not return
// ... or start it by using a dedicated thread
// srv.start(); // returns after the server has been started
}
}
public interface ServiceServerMBean {
// Attribute
public String getTestMessage();
public String setTestMessage( String t );
// Operation
public void closing( boolean b );
}
public class ServiceHandler implements IDataHandler,IConnectHandler,IDisconnectHandler,IConnectionScoped, ServiceServerMBean {
public String getTestMessage()
{
meldung = "1000 Kühe machen keine Milchstrasse";
return meldung;
}
public String setTestMessage( String t )
{
meldung = t;
return meldung;
}
public void closing( boolean b )
{
if(b == true) {
System.exit(0);
}
}
}
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de
|
|
From: <e-m...@we...> - 2010-02-19 10:46:49
|
Hello together,
i hope anyone can help me. I have a problem with using the registerMBean method.
If i register an IServer i can see (with the jconsole) any attributes (get method), but i can not see/use an operation.
My task is to find a way for closing a thread with using the jconsole ore an other tool.
Thanks for any help!!!
My Quellcode:
public class ServiceServer {
public static void main(String args[]) throws Exception {
// creates the server by passing over the port number & handler
IServer srv = new Server(8091, new ServiceHandler());
ConnectionUtils.registerMBean(srv);
// run it within the current thread.
srv.run(); // the call will not return
}
}
public interface ServiceHandlerMBean {
// Attribute
public String getTestMessage();
public String setTestMessage( String t );
// Operation
public void closing( boolean b );
}
public class ServiceHandler implements ServiceHandlerMBean {
public String getTestMessage()
{
meldung = "1000 Kühe machen keine Milchstrasse";
return meldung;
}
public String setTestMessage( String t )
{
meldung = t;
return meldung;
}
public void closing( boolean b )
{
if(b == true) {
System.exit(0);
}
}
}
___________________________________________________________
NEU: Mit WEB.DE DSL über 1000,- ¿ sparen!
http://produkte.web.de/go/02/
|
|
From: Kevin B. <kev...@go...> - 2010-02-19 08:47:20
|
Hello,
For a production level socket server what are the potential pitfalls
that I have to consider :
1. I have started the server as per the tutorial on the homepage using
IServer srv = new Server(8090, new TestHandler());
srv.run();
2. The TestHandler class implements the following interfaces
IDataHandler, IConnectHandler, IDisconnectHandler,
IIdleTimeoutHandler, IConnectionTimeoutHandler.
3. I haven't set any "System Properties" as yet and "FlushMode.ASYNC"
is not set.
4. Connection and Idle timeout's are set to default.
I have uploaded this to my VPS host. However before letting it loose in
production I wanted to test it for reliability and scalabity. Any
suggestions here would be welcome.
Memory is another aspect , My VPS host has allotted me 1GB ram with
around 8GB burst capability, is this sufficient. (As of now I have only
500MB free)
My clients would be continuously connected to the server 24x7, how much
resource would each client connection take up in terms of ram, if 1000
or more clients would be connected how do I compute the amount of ram
that would be necessary to safely run the socket server.
Please suggest other points that I have missed out here.
Regards,
Kevin
|
|
From: <e-m...@we...> - 2010-02-19 08:28:00
|
<body bgcolor="#ffffff" background="https://freemailng0606.web.de/online/msg/edit.htm?rv_ismail=yes&rv_linkfrom=menu&si=MHuiCMv5E5fBTrvOIwJ*023" class="bgRepeatYes" style="background-repeat: repeat; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: verdana,geneva; font-size: 9pt; padding-left: 0px;" ><div style="min-height: 200px; background-image: url(https://img.web.de/v/p.gif); background-repeat: repeat; background-color: #ffffff; font-family: verdana,geneva; font-size: 9pt; padding-left: 0px;"> <p><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span style="background-color: transparent;"><span style="color: #000000;"><span style="color: #000000;"> Hello together,</span></span></span></span></span></p> <p><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span style="background-color: transparent;"><span style="color: #000000;"><span style="color: #000000;">i hope anyone can help me. I have a problem with using the registerMBean method.</span></span></span></span></span></p> <p><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span style="background-color: transparent;"><span style="color: #000000;"><span style="color: #000000;">If i register an IServer i can see (with the jconsole) any attributes (get method), but i can not see/use an operation.</span></span></span></span></span></p> <p><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span style="background-color: transparent;"><span style="color: #000000;"><span style="color: #000000;">My task is to find a way for closing a thread with using the jconsole ore an other tool.</span></span></span></span></span></p> <p>Thanks for any help!!!</p> <p> </p> <p>My Quellcode:</p> <p><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span style="background-color: transparent;"><span style="color: #000000;"><span style="color: #000000;">public class ServiceServer {<br /> public static void main(String args[]) throws Exception {<br /> // creates the server by passing over the port number & handler<br /> IServer srv = new Server(8091, new ServiceHandler());<br /> <br /> // 08.07.2009: JMX-Registrierung<br /> ConnectionUtils.registerMBean(srv);<br /> <br /> // run it within the current thread.<br /> srv.run(); // the call will not return<br /><br /> // ... or start it by using a dedicated thread<br /> // srv.start(); // returns after the server has been started<br /> }<br />}</span></span></span></span></span></p> <p>public interface ServiceServerMBean {<br /> // Attribute<br /> public String getTestMessage();<br /> public String setTestMessage( String t );<br /> <br /> // Operation<br /> public void closing( boolean b );<br />}</p> <p>public class ServiceHandler implements IDataHandler,IConnectHandler,IDisconnectHandler,IConnectionScoped, ServiceServerMBean {</p> <p> public String getTestMessage()<br /> {<br /> meldung = "1000 Kühe machen keine Milchstrasse";<br /> return meldung; <br /> }<br /> <br /> public String setTestMessage( String t )<br /> {<br /> meldung = t;<br /> return meldung; <br /> }<br /> <br /> public void closing( boolean b )<br /> {<br /> if(b == true) {<br /> System.exit(0);<br /> }<br /> }</p> <p>}</p> </div> <br><br><table cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#000000"><img src="https://img.web.de/p.gif" width="1" height="1" border="0" alt="" /></td></tr><tr><td style="font-family:verdana; font-size:12px; line-height:17px;">GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! <br>Jetzt freischalten unter http://movieflat.web.de</td></tr></table> </body> |
|
From: Gregor R. <gre...@gm...> - 2010-02-07 12:51:51
|
Hi shreyas, the receivesize parameter defines the size of read buffer, which will used to read the datagram. Gregor ----- Original Message ----- From: Shreyas Purohit Sent: 02/05/10 11:13 PM To: xso...@li... Subject: [xSocket-develop] Multicast "receiveSize" argument Hi, In constructor, public *MulticastEndpoint*(java.lang.String address, int port, int receiveSize, IDatagramHandler <http://xsocket.sourceforge.net/api/org/xsocket/datagram/IDatagramHandler.html> datagramHandler) throws java.io.IOException The receiveSize is being expected. I do not know the size of the packet that I will be getting from the network. Also, I do not see a constructor that takes only address, port and datagramHandler as arguments. Can anyone please tell me how to go about this? Thanks, Shreyas Purohit ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ xSocket-develop mailing list xSo...@li... https://lists.sourceforge.net/lists/listinfo/xsocket-develop |
|
From: Shreyas P. <shr...@gm...> - 2010-02-05 22:14:03
|
Hi,
In constructor,
public *MulticastEndpoint*(java.lang.String address,
int port,
int receiveSize,
IDatagramHandler <http://xsocket.sourceforge.net/api/org/xsocket/datagram/IDatagramHandler.html> datagramHandler)
throws java.io.IOException
The receiveSize is being expected. I do not know the size of the packet
that I will be getting from the network. Also, I do not see a
constructor that takes only address, port and datagramHandler as
arguments. Can anyone please tell me how to go about this?
Thanks,
Shreyas Purohit
|
|
From: Gregor R. <gre...@gm...> - 2010-02-05 05:46:37
|
Hi, WebSockets support for xLightweb has just been released. The new web socket extension of xLightweb implements the current Web Socket protocol draft. It includes Web Socket support for the client-side and server-side. Gregor |
|
From: Kashinath <kas...@gm...> - 2010-01-31 09:07:14
|
Just a friendly reminder that I invited you to Shelfari. Come see the books I love and see if we have any in common. Then pick my next book so I can keep on reading. Click below to join my group of friends on Shelfari! http://www.shelfari.com/register?ActivityId=120801639&InvitationCode=240bfc99-e733-46c1-9af3-c45f3aaafccb Kashinath Shelfari is a free site that lets you share book ratings and reviews with friends and meet people who have similar tastes in books. It also lets you build an online bookshelf, join book clubs, and get good book recommendations from friends. You should check it out. You have received this email because Kashinath (kas...@gm...) directly invited you to join his or her community on Shelfari. It is against Shelfari's policies to invite people who you don't know directly. Follow this link (http://www.shelfari.com/invitationOptOut?ema...@li...&activityid=120801639) to prevent future invitations to this address. If you believe you do not know this person, you may view (http://www.shelfari.com/kashinathpai) his or her Shelfari page or report him or her in our feedback (http://www.shelfari.com/faq) section. Amazon.com, 701 Fifth Avenue, Seattle, WA 98104 |
|
From: 李洪文 <hon...@16...> - 2010-01-29 08:23:53
|
Gregor,
Thank you.
The class HttpServer need to add a constructor too.
PS. You do a very good job! I think it is better than Apache Mina.
Hongwen
2010-01-29 13:09:20,"Gregor Roth" <gre...@gm...> wrotes:
Hi,
I am going to add the missing constructors.
Gregor
----- Original Message -----
From: Hongwen
Sent: 01/29/10 02:03 AM
To: Gregor Roth
Subject: Re:Re: [xSocket-develop] how to sharing worker pool
Thanks for your reply.
I found it in the constructors of class NonBlockingConnection.
But no constructors supports Executor in class HttpClientConnection of xLightWeb project. So , I cannot do the performance optimization.
Sorry for my pool English.
At 2010-01-28 13:09:32,"Gregor Roth" <gre...@gm...> wrote:
Hi,
the Server class supports constructors which includes a Executor. Create a Executor and pass it over by instantiating your servers.
Gregor
----- Original Message -----
From: 李洪文
Sent: 01/28/10 05:09 AM
To: xso...@li...
Subject: [xSocket-develop] how to sharing worker pool
I'm programming a proxy server,
including http,socks protocol.
so it has more than 3 Server and serveral connectors.
Each has it's owner worker pool.
i think it is not good.
how to share these servers and connectors with one worker pool?
thanks
网易邮箱,没有垃圾邮件的免费电子邮箱!
网易邮箱,没有垃圾邮件的免费电子邮箱!
网易邮箱,没有垃圾邮件的免费电子邮箱!
|
|
From: Gregor R. <gre...@gm...> - 2010-01-29 05:09:32
|
Hi, I am going to add the missing constructors. Gregor ----- Original Message ----- From: 李洪文 Sent: 01/29/10 02:03 AM To: Gregor Roth Subject: Re:Re: [xSocket-develop] how to sharing worker pool Thanks for your reply. I found it in the constructors of class NonBlockingConnection. But no constructors supports Executor in class HttpClientConnection of xLightWeb project. So , I cannot do the performance optimization. Sorry for my pool English. At 2010-01-28 13:09:32,"Gregor Roth" <gre...@gm...> wrote: Hi, the Server class supports constructors which includes a Executor. Create a Executor and pass it over by instantiating your servers. Gregor ----- Original Message ----- From: 李洪文 Sent: 01/28/10 05:09 AM To: xso...@li... Subject: [xSocket-develop] how to sharing worker pool I'm programming a proxy server, including http,socks protocol. so it has more than 3 Server and serveral connectors. Each has it's owner worker pool. i think it is not good. how to share these servers and connectors with one worker pool? thanks ----------------------------------------------------------------- 网易邮箱,没有垃圾邮件的免费电子邮箱! http://www.yeah.net/?from=o1 ----------------------------------------------------------------- 网易邮箱,没有垃圾邮件的免费电子邮箱! http://www.yeah.net/?from=o1 ----------------------------------------------------------------- 网易邮箱,没有垃圾邮件的免费电子邮箱! http://www.yeah.net/?from=o1 |
|
From: 李洪文 <hon...@16...> - 2010-01-29 01:03:38
|
Thanks for your reply. I found it in the constructors of class NonBlockingConnection. But no constructors supports Executor in class HttpClientConnection of xLightWeb project. So , I cannot do the performance optimization. Sorry for my pool English. At 2010-01-28 13:09:32,"Gregor Roth" <gre...@gm...> wrote: Hi, the Server class supports constructors which includes a Executor. Create a Executor and pass it over by instantiating your servers. Gregor ----- Original Message ----- From: 李洪文 Sent: 01/28/10 05:09 AM To: xso...@li... Subject: [xSocket-develop] how to sharing worker pool I'm programming a proxy server, including http,socks protocol. so it has more than 3 Server and serveral connectors. Each has it's owner worker pool. i think it is not good. how to share these servers and connectors with one worker pool? thanks 网易邮箱,没有垃圾邮件的免费电子邮箱! 网易邮箱,没有垃圾邮件的免费电子邮箱! |
|
From: Kashinath <kas...@gm...> - 2010-01-28 12:51:31
|
I just joined Shelfari to connect with other book lovers. Come see the books I love and see if we have any in common. Then pick my next book so I can keep on reading. Click below to join my group of friends on Shelfari! http://www.shelfari.com/register?ActivityId=120509349&InvitationCode=240bfc99-e733-46c1-9af3-c45f3aaafccb Kashinath Shelfari is a free site that lets you share book ratings and reviews with friends and meet people who have similar tastes in books. It also lets you build an online bookshelf, join book clubs, and get good book recommendations from friends. You should check it out. You have received this email because Kashinath (kas...@gm...) directly invited you to join his or her community on Shelfari. It is against Shelfari's policies to invite people who you don't know directly. Follow this link (http://www.shelfari.com/invitationOptOut?ema...@li...&activityid=120509349) to prevent future invitations to this address. If you believe you do not know this person, you may view (http://www.shelfari.com/o1514529620) his or her Shelfari page or report him or her in our feedback (http://www.shelfari.com/faq) section. Amazon.com, 701 Fifth Avenue, Seattle, WA 98104 |
|
From: Gregor R. <gre...@gm...> - 2010-01-28 05:09:43
|
|
From: 李洪文 <hon...@16...> - 2010-01-28 04:09:32
|
I'm programming a proxy server, including http,socks protocol. so it has more than 3 Server and serveral connectors. Each has it's owner worker pool. i think it is not good. how to share these servers and connectors with one worker pool? thanks |
|
From: Gregor R. <gre...@gm...> - 2010-01-27 06:56:43
|
|
From: Bhatnagar, V. (Ved) <vbh...@av...> - 2010-01-26 18:25:11
|
Hi, Does xsocket SSL impl support SSL V3? Thank you all in advance, Ved |
|
From: Gregor R. <gre...@gm...> - 2010-01-26 07:08:48
|
|
From: Петър И. <pet...@re...> - 2010-01-25 11:14:26
|
Hello,
I have problem when implementing IConnectionScoped.
I have this class:
public class ServerEchoHandler
implements IDataHandler,IDisconnectHandler,IConnectHandler,
IConnectionScoped
and this one:
public class ClientSessionInfo
implements Cloneable
ClientSessionInfo sessionData;
in ServerEchoHandler i got this method :
public Object clone() throws CloneNotSupportedException
{
ServerEchoHandler copy = (ServerEchoHandler ) super.clone();
copy.sessionData = (ClientSessionInfo )this.sessionData.clone();
return copy;
}
in ClientSessionInfo :
public Object clone()
{
Object clone = null;
try
{
clone = super.clone();
}
catch(CloneNotSupportedException e)
{
// should never happen
}
return clone;
}
When I start the client and try to connect to my server,the server
throws this : "WARNING: error occured while accepting connection"
and the connection is not accepted from the server.
When I remove the implementation of IConnectionScoped everything works
fine-the server accept connection from my client.
Is there anyone that can help me.Thanks!
|
|
From: quan n. h. <hu...@gm...> - 2010-01-14 06:41:13
|
to clear, i attach some code i write for this issue MyServer include: ConnectHandler: send/recv handshake with MyClient every 3s. MyThread: send message to client & receive msg resp i want recv msg-resp at MyThread, but it's received in ConnectHandler & throw excetion in MyThread thanks -Quan On Thu, Jan 14, 2010 at 12:12 PM, Gregor Roth <gre...@gm...> wrote: > Hello Quan, > > please provide a small JUnittest for this issue. > > Thanks > > Gregor > > > > ----- Original Message ----- > > From: Gregor Roth > > Sent: 01/13/10 08:52 AM > > To: quan nguyen huu > > Subject: Re: [xSocket-develop] receiving data outsite onData method > > > > thanks for reply > > my server module using INonblockingConnection to send/receive data > with client. In addition, it must receive/send-respon HANDSHAKE > message with client to maintain connection. > > i use call back handler (implements IDataHandler) to send/receive > Handshake message with client & other thread A to send/receive other > message. > > the problem: my thread A send data to client well, but when it receive > data response it throw exception. > > > -Quan > > > > On Wed, Jan 13, 2010 at 1:49 PM, Gregor Roth <gre...@gm...> wrote: >> Hi, >> >> the read methods of NonblockingConnection returns immediately. If not >> enough >> data is received, a read method such as readLong() or >> readStringByLength(…) >> will throw a BufferUnderflow exception -> the read methods never block by >> calling. This is not true for the BlockingConnction. In this case a read >> methods blocks (waits) for more data if not enough is available. >> >> Gregor >> >> >> >> ----- Original Message ----- >> >> From: Gregor Roth >> >> Sent: 01/13/10 05:43 AM >> >> To: quan nguyen huu >> >> Subject: [xSocket-develop] receiving data outsite onData method >> >> >> >> hi >> >> i have a thread using INonBlockingConnection outsite xSocket thread to >> send & receiving data with client (my program is server). >> >> it send ok, but when receive data, it throw exception: >> java.io.BufferUnderflowException (because it conflict with onData >> thread of xSocket ??) >> >> i try add ConnectionUtils.synchronizedConnection method but it still >> throw error. >> >> any suggest? >> >> thanks >> -Quan >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> xSocket-develop mailing list >> xSo...@li... >> https://lists.sourceforge.net/lists/listinfo/xsocket-develop >> >> > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |
|
From: Gregor R. <gre...@gm...> - 2010-01-14 05:12:52
|
|
From: quan n. h. <hu...@gm...> - 2010-01-13 07:53:28
|
thanks for reply my server module using INonblockingConnection to send/receive data with client. In addition, it must receive/send-respon HANDSHAKE message with client to maintain connection. i use call back handler (implements IDataHandler) to send/receive Handshake message with client & other thread A to send/receive other message. the problem: my thread A send data to client well, but when it receive data response it throw exception. -Quan On Wed, Jan 13, 2010 at 1:49 PM, Gregor Roth <gre...@gm...> wrote: > Hi, > > the read methods of NonblockingConnection returns immediately. If not enough > data is received, a read method such as readLong() or readStringByLength(…) > will throw a BufferUnderflow exception -> the read methods never block by > calling. This is not true for the BlockingConnction. In this case a read > methods blocks (waits) for more data if not enough is available. > > Gregor > > > > ----- Original Message ----- > > From: Gregor Roth > > Sent: 01/13/10 05:43 AM > > To: quan nguyen huu > > Subject: [xSocket-develop] receiving data outsite onData method > > > > hi > > i have a thread using INonBlockingConnection outsite xSocket thread to > send & receiving data with client (my program is server). > > it send ok, but when receive data, it throw exception: > java.io.BufferUnderflowException (because it conflict with onData > thread of xSocket ??) > > i try add ConnectionUtils.synchronizedConnection method but it still > throw error. > > any suggest? > > thanks > -Quan > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |
|
From: Gregor R. <gre...@gm...> - 2010-01-13 06:49:53
|
|
From: quan n. h. <hu...@gm...> - 2010-01-13 04:43:28
|
hi i have a thread using INonBlockingConnection outsite xSocket thread to send & receiving data with client (my program is server). it send ok, but when receive data, it throw exception: java.io.BufferUnderflowException (because it conflict with onData thread of xSocket ??) i try add ConnectionUtils.synchronizedConnection method but it still throw error. any suggest? thanks -Quan |