TCP socket and MDS/BES

Hi All,
We, in our app tried using the following statements by getting a reference from a blackberry document but the issue here is that following statement dint work.
the connection opening statements are:
1 socket://<ip> : <port>; // notice no deviceside param, on http://www.blackberry.com/knowledgecenterpublic/li​velink.exe/fetch/2000/348583/800451/800563/What_Is​...
the following line is written.
"If BlackBerry MDS is not available at the time of connection, the BlackBerry smartphone reverts to direct TCP".
but on emulator itself this is not happening, above statement works only when MDS is running on my system.
so my question is what will be the exact behaviour on device or on emulator
if
1 We provide deviceside param either TRUE or FALSE?
2 We dint provide it all, like above?
3 Is it carrier dependent?
Please sort our my problem, as this is eating up our time.
Thanks
DC

What happens if you call setTcpNoDelay(false) on that Socket you're using to send the data? That call would have the effect of instructing the networking layer to send data as soon as you have it rather than waiting for a certain occupancy in the buffer before transmitting. This is pretty much essential if you require any kind of interactivity in my experience, but it harms total throughput since the networking layer can't optimize by buffering your data.
As was previously mentioned, flushing is likely to do the job in a cleaner fashion (write all your packets and then call flush to force the last one out). Any luck with that?

Similar Messages

  • TCP Socket connection in CLOSE_WAIT status and not getting closed

    I am facing an issue with the TCP socket connections not getting closed and they are in CLOSE_WAIT status for ever.
    As a part of batch process in our application, emails are sent with 4 embedded images. These images are downloaded from 3rd party site with IP say "UUU.XXX.YYY.ZZZ"
    The images are embedded to email as follows
    1. An URL object is created with the site url.
    URL urlPhoto = new
    URL("http://UUU.XXX.YYY.ZZZ/email/photos.jpg");
    2.     The image cid is created with the URL object and the image name
    HtmlEmail htmlEmail = new HtmlEmail();
    String cid1 = htmlEmail.embed(urlPhoto,
    "photo.jpg");
    3.     The image cid is added to the email template by replacing the ${cid1} and the email is sent.
    <td valign="top">
                   <img src="cid:${cid1}" width="279" height="274">
              </td>
    When a mail is sent, 4 new TCP connections are opened and are put in CLOSE_WAIT status for ever. For every mail sent 4 new connections are opened. In UNIX there is an upper limit on the number of open file handles (defaults to 1024) at any point of time. The open TCP connection has the underlying socket in CLOSE_WAIT status and is not getting closed at all. When the upper limit (1024) is reached the batch process is throwing the following exception and terminates.
    Caused by: com.inet.tds.ap: java.net.SocketExceptionjava.net.SocketException: Too many open files
    at com.inet.tds.am.a(Unknown Source)
    at com.inet.tds.TdsDriver.a(Unknown Source)
    at com.inet.tds.TdsDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.hcomemea.batchprocess.dataaccess.database.BaseJdbcDao.openConnection(BaseJdbcDao.java:106)
    ... 12 more
    When I run the command lsof in UNIX which list the open file handles in the system
    $ /usr/sbin/lsof -p 22933 -i | grep CLOSE_WAIT
    java 22933 build_master 297u IPv6 129841943 TCP integration.com:47929->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 298u IPv6 129841947 TCP integration.com:47933->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 299u IPv6 129841950 TCP integration.com:47936->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 300u IPv6 129841970 TCP integration.com:47952->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    ���list of 935 connections similarly�
    I tried 2 solutions
    1. Got the HttpURLConnection from the URL object and invoked disconnect method on the same. But it doesn�t work.
    2. Ran the batch process java program with the parameter �Dhttp.keepAlive=false to close the underlying connection but didn�t help.
    I need the underlying sockets to be closed and not put in CLOSE_WAIT status after sending the mail.
    Is it the problem with the embed method of HtmlEmail object not closing the underlying socket connection.
    If anyone has faced this issue before, kindly let me know the possible solutions for the same ASAP.
    Thank you,
    Ramesh G

    This sounds more like a problem due to connection pooling at middle tier/application server.
    If that has been ruled out, then you might to enable DCD or set expiry time on the server.

  • How do I receive TCP data, and forward this data out a UDP socket?

    I can receive the TCP data and get it into an inputStream. I can also create the UDP socket-to send out a datagram packet.. I'm having a hard time getting the Input Stream data into a format acceptable for an UDP socket.

    I can receive the TCP data and get it into an
    inputStream. I can also create the UDP socket-to
    send out a datagram packet.. I'm having a hard time
    getting the Input Stream data into a format
    acceptable for an UDP socket.That's because you shouldn't and don't and won't be doing that.
    TCP is a stream protocol. UDP is a simpler protocol for sending packets. UDP is not suitable for use as a streamed protocol.
    If you want streams use TCP.

  • TCP teardown and method close of the socket API

    Hi,
    If I call the method 'close' of the java tcp socket, does the tcp teardown occur asynchronously? Or does method 'close' block as long as the tcp handshake to close the connection needed?
    Thanks
    Chris

    By default, close() will flush any remaining data and tear down the connection asynchronously.
    You can change this behaviour with the SO_LINGER socket option, see Socket javadoc. SO_LINGER has operating system dependent corner cases, see http://www.developerweb.net/forum/archive/index.php/t-2982.html
    These also have paragraphs on the behaviour on a couple of OSes, search for SO_LINGER:
    http://docs.sun.com/app/docs/doc/816-0214/6m6nf1ook?a=view
    http://www.informatik.uni-frankfurt.de/doc/man/hpux/getsockopt.2.html
    http://msdn2.microsoft.com/en-us/library/ms737582.aspx

  • TCP Open and Close using NI TCP VI's

    Do I need to close the TCP connections on both ends.  For example, I have a "server" that Listens and then a client that opens the TCP connection.  Do I have to close the TCP connections on both ends.  I'm closing it at the client side but is it also suppose to be closed at the Listening end?

    Guy04 wrote:
    Do I need to close the TCP connections on both ends.  For example, I have a "server" that Listens and then a client that opens the TCP connection.  Do I have to close the TCP connections on both ends.  I'm closing it at the client side but is it also suppose to be closed at the Listening end?
    Whenever you optain a LabVIEW refnum through an Open or similar function you should close it at some point too. A TCP refnum is really sort of a pointer to a local network socket and therefore represents resources in the form of memory and network stack management information. Not closing a connection refnum returned by the listen node may prevent your server to serve new connections after some time, since all internal network ports are blocked or the nework stack runs out of resources.
    So close the connection refnum returned by the Listen function after the server is done serving your client and of course do the same on the client side as you already did. Also if you use Create Listener and Wait on Listener (which allows you to write server applications that can serve multiple connections simultanously) close the Listener refnum too when your server is done. Not doing so may prevent the server to be opened at the same port without restarting LabVIEW or at least your application.
    Rolf Kalbermatter
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • One socket and two ports, not getting response from the server

    Hi everyone,
    I am working on device which communicate through Tcp sockets, It has an IP address and one port for listening and another for sending the response.
    Problem is that I am able to create a connection to Device ip+port, and i am trying to listen on the same port while the device is sending the response on other port. My problem is that i can't create another socket using this port and therefore not getting the response from the device.
    Can you people tell me how to handle such socket communication in java ?
    Thanks in advance.

    I am working on device which communicate through Tcp sockets, It has an IP address and one port for listening and another for sending the response.Are you sure? That's not usual. It would be usual for it to use the same port for listening, reading, and writing.
    Problem is that I am able to create a connection to Device ip+port, and i am trying to listen on the same port while the device is sending the response on other port.I would try just reading from the same socket you are sending on. I suggest you have misunderstood how the device works.

  • Using TCP/IP and SNA LU0 and TAPE communication protocols

    Hi ,
    I need to require information to communicate over TAPE, TCP/IP and SNA LU0 protocols using OSB/SOA SUITE ,
    kindly guide me if it's possible to make services that can communicate with the above mentioned protocols and if it's n't possible, then how can OSB/SOA SUITE communicate with above mentioned protocols, or are there any adapters to be used for the conversion of the above mentioned protocols into OSB understandable protocol.
    Regards,
    Abhinav

    Hi Abhinav,
    You may use transport SDK to develop custom transport and use them with OSB. Please refer -
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/part_tsdk.htm#sthref954
    There is also a sample for socket transport-
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/example.htm#i1036682
    Regards,
    Anuj

  • TCP Socket Adapter

    I want to use BPEL to integrate Oracle CRM with some banking software that validates bank sort codes and account numbers. The banking validation software listens for an input stream on a TCP socket.
    Can anyone tell me where I can find the technology socket adapter that are referenced on a number of Oracle presentations?
    I know I could write code in Java to achieved the same effect, but if there is an adapter that can do the job then that is preferable.

    I too am looking for this. I see that one of the posters above mentions an item provided by oracle, more details would be appreciated.
    In the mean time, I think the way to go is to write a POJO that sits on the the tcp port and gets into the ESB via a message queue, allowing it to "send an event" if you will.
    The scenario where you want to go outbound to tcp might be a bit trickier, if I use the POJO approach, then my code is outside of the ESB, since the ESB would end by dumping to a message queue, and my POJO would pick up from there.
    It would be really nice to have an Oracle component specificially for TCP.

  • How can I catch a connection reset with sockets and NSFileHandle

    Hi,
    I have an iPhone Client that connects to a remote server through a basic TCP Socket (Connected mode, ie SOCK_STREAM).
    The communication pipe is then managed through an NSFileHandle.
    Everything works fine as long as I don't reset the Server.
    In that case, I receive an exception notification in X-Code Debugger. My problem is that I don't know how to catch (and thus manage) this exception:
    *NSFileHandleOperationException, reason : [NSConcreteFileHandle readDataOfLength:] : connection reset by peer*
    I tried something like that, but I never catch anything there, since I get there only when I have available data, and there are none since the server has closed.
    @try{
    incomingData = [ListeningSocket readDataOfLength:]
    ²catch(NSException * e){
    NSLog("ReadDataOfLenght notified : %@ with reason : %@",[e name],[e reason])
    Do some of you know how I can manage server reset to avoid getting and (unmanaged) exception?

    You should consider using Bonjour based dynamic publishing and discovery of your service. So when the server service dies, and restarts, the client can detect the restart automatically and connect to the new address of the server.
    Hope it helps. (Sorry for the belated response. . I just ran into this post).

  • TCP sockets on MIDP over GPRS

    Extending the CLDC socket.Protocol class I can make a TCP socket connection from a MIDlet. I'm hoping to market my application on GPRS networks, but I'm not sure that it supports TCP connections. I've read that TCP runs on circuit switching networks, and UDP on packet switching networks. I think GPRS is the latter. I need to maintain a constant, "connection-oriented" socket - i.e. TCP. Does anyone happen to know whether TCP/IP will function properly over GPRS? I realise this is why MIDP only implements HTTP and not raw sockets, but I thought it was worth asking anyway. Any help at all would be greatly appreciated.

    Hi Briggsd!
    I'm playing with some sockets.
    can you please help me?!
    J2ME uses only HTTP connections?
    and what are the sockets? what is the difference between CLDC socket and J2SE Socket?
    is there any other way to communicate with a Servlet?
    and very important..
    is there a difference if it's using GPRS or 3G?
    would the http connection work for all? and just the connection speed would change?
    help me!!

  • BO Mobile: Blackberry connection witout MDS/BES

    Hi,
    is it possible to connect to mobile bi, without mds/bes ?
    If It's possible (using prox or direct connection to the mobile server, how would the conifguration files look like ?
    Kind Regards,
    Alican

    Hi,
    it works with HTC (windwos ce) and with the Blackberry Simulator (and the MDS Simulator).
    But I can't make it run with Blackberry without using MDS.
    Regards, Alican

  • Audio over TCP Socket

    Hi,
    I need a sample code for transmit/receive a audio over TCP socket.. can anybody help me?

    You send and receive it in the same way as you handle any binary data.
    Kaj

  • Which load testing tool is appropriate for sending message to a tcp socket

    Hi,
    I am new to the testing world. I have developed a messaging application, where the client sends his requests on to the server program which opens a socket and listens for messages. Then all mesaging goes on. I want to load test my application. I have tested it with Apache's JMeter, besides that are there any other load testing tools.
    The clients need to send messages on a tcp socket. I really need this, please help me.
    Thanks,

    Dude,
    Write one!
    I test any servers I've written by hammering them by writing a multi-threaded test program to simulate client activity, namely an initial login and then whatever other activity the client would usually perform. Maybe in your case this would involve the sending of messages, the checking/reading of new messages and logging out.
    I usually get my timing statistics by simply capturing a start time and an end time (the difference being the m/s taken). ie: using java.util.Date.
    Run the test program from a single host to iron out any initial problems, but then be sure to run it from as many different hosts as you can get your mitts on!

  • Communication with database using TCP sockets connection

    Hi all,
    I am bit of a newbie when it comes to databases. In a project I realised over te passed few weeks, I communicated with an 11g database using an application I created with VS Express. It uses an ODBC connection. I now want to connect a PLC to the same database. These PLC's don't have the ability to install an ODBC client so I need something different.
    I am easily able to open a TCP socket on the PLC and send data from there. I would like to know if I can start a TCP sockets connection with our 11g server and send all queries directly. The other (already suggested) option would be to have the PLC connect to a PC that reads this information and hands it over to the ODBC connector, but that would mean I need an extra PC just to 'translate'.
    I have been searching these forums for socket, TCP and more and feel it is possible, but I need a good document as a reference to show/tell me how it's done.
    Thanks in advance,
    Marijn

    The TCP/IP interface to Oracle is undocumented (and hugely complex anyway). You'll need to use a higher layer iterface or setup your own infrastructure.
    We need more information about what is available to you inside the PLC.
    Can you use Java? If so, perhaps use thin JDBC?
    Can you sent HTTP requests? If so you could set up your own Web services to handle this.
    If you can only use C or C++, Oracle has interfaces there too.. it's called OCI (Oracle Call Interface) and thats as close to the networking layer as you can get.
    Finally if you can use .NET Oracle has a Fully Managed Oracle Data Provider for .NET that you could use.
    But if all you can do is super low level network access and none of the above then you will need to set up an intermediary as you mentioned.

  • TCP client and TCP server...

    i m doing a project in GUI form, where the client need to enter data in text field and the data will be pass to server to process, for example if client click button "ADD" then a particular data will pass to server and do sth (save data into a file), or if client click button "DELETE", the client is actually call server to delete a particular file stored in server, how can i do it using TCP socket ??

    Hi,
    Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
    According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    Console.WriteLine(exception.Message);
    Unable to read data from the transport connection: An existing   connection was forcibly closed by the remote host.
    By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to determine the scratch disc size?

    hello, once i was reading an adobe pdf "How to get better performance in photoshop cs5" - that was in 2009 or 2010, and may be outdated, but there was a calculation method to determine the size of a scratch disc. (similar calculation see below, if i

  • Re: Not getting advertised internet speed

    We have not ever gotten what we paid for.  we are suppose to get 105 download speed.  We are lucky if we get over 10 download (tested on different days and all different times of day) The problem started as soon as we upgraded to the faster speed abo

  • Does mail "zip" numbers and keynote files

    Hi, The mail server at my university automatically deletes attachments that are zip file. When i attach either a keynote or numbers file the mail server software sees these as zip files and deletes them, whether incoming or outgoing. The IT departmen

  • Presets not active in Lightroom 5. Why?

    Why aren't my presets active in Lightroom 5 but are active in Lightroom 4? George

  • How can I get the ios7on my iPod 4th generation

    How can I get the iOS 7 on my iPod touch