Socket or Http

HelloW...

I have a guy to connect my application to internet I check first that its available interface... When I determined that the unit have put wifi «;» interface wifi = "or"; "device = true".

buddy its in the beginning of the url I put

http://XXXXXXXXX; Parameter or socket://xxxxxxxxxxx

for example, I try whit http for wifi and the works, but here say that use the plug, so if use http its bad?

and I have allways a port? in the docs, I see: 600

http://supportforums.BlackBerry.com/T5/Java-development/different-ways-to-make-an-HTTP-or-socket-con...

HTTP is a Protocol built on sockets. If you want to do a HTTP transaction (GET, POST, etc.), then you use http://... and when you create the connection, cast to an HttpConnection. If you're doing something else (streaming media or telnet, for example), then you don't use HTTP. You must use the socket: / /... and set up the connection to a SocketConnection.

By default, HTTP port 80. By default, HTTPS uses port 443. Casings, however, generally do not have default ports and you specify one. Many ports have pre-defined uses; See, for example, http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Tags: BlackBerry Developers

Similar Questions

  • How to make HTTP GET request socket?

    I want to use socket make HTTP GET, but I always got the error 501 return.

    Result:



    501 method not implemented

    Method not implemented


    to / index.html unsupported.



    Apache/2.0.52 (CentOS) Server at li43-231.members.linode.com Port 80

    Code:

    streamConnection =
    (StreamConnection) Connector.Open (getURL (3) + APN_STR, Connector.READ_WRITE);
               
    create DataOuputStream on the top of the socket connection
    outputStream = streamConnection.openOutputStream ();
    dataOutputStream = new DataOutputStream (outputStream);
               
    Send the HTTP request
    dataOutputStream.writeChars ("GET/index.html http/2.0\n");
    dataOutputStream.writeChars ("host: badev.liveblockauctions.com\n");
    dataOutputStream.writeChars("User-Agent:BlackBerry/3.2.1\n");
    dataOutputStream.writeChars("Content-Language:en-US\n\n");

    dataOutputStream.flush ();
               
    create DataInputStream on top of the socket connection
    inputStream = streamConnection.openInputStream ();
    dataInputStream = new DataInputStream (inputStream);
               
    retrieve the content of the requested server Web page
    int inputChar;
    int size = 0;
    StringBuffer results = new StringBuffer();
    While ((inputChar = dataInputStream.read ())! = - 1) {}
    size ++;
    Results.Append ((Char) inputChar);
    }

    JDE 4.6 and blackberry "BOLD".

    Any suggestion?

    Thank you very much!

  • Taking over Http in Blackberry

    Hello

    How to reach the socket on the connection Http (SOHT) connection in Blackberry devices?

    Help, please

    My understanding of this is not an outlet running over an http connection.  Who uses an http request to transfer the payload to the device rather than using a power outlet.  So, these are some alternative mechanisms, treated differently on the server and the device, not the layers of alternative communication.

    A difference between a socket connection and http is connection - socket is continuous, http is not.  You will see from here:

    http://www.operamini.com/Help/FAQ/#http-socket

    If Exchange you it for an http connection, you lose the connection continues. This confirms, as far as I'm concerned, that Opera mini did not use the socket over http.

  • File Upload HTTP with plug

    Hello

    I am currently working on scripts that use the Socket for HTTP communication with our server, I found a lot of answers to my question by conducting a search in the forum, but now I'm stuck with an HTTP download.

    I create an overview of the current pages and I want to download this song on the server. The server runs a java application and I have a java application to download test files - I know that the download works and the problem is in the script.

    I read the file into a string and I create a Socket connection to the server. I created another channel with the content to download (file and additional information), love and I send you the MESSAGE HTTP to the server. And I always get a "stream ended unexpectedly" error from the server.

    So, I think, the length of the content is the problem. Server expects a number of bytes, and I do not send the bytes expected. How to calculate the length of the content?

    This is my code:

    conn = new Socket;

    response = "";

    var f = file ('c:\\tmp\\jdExport.jpg');

    f.Encoding = "BINARY";

    f.Open ("r");

    var fContent = f.read ();

    f.Close ();

    If (conn.open ('127.0.0.1:8081', 'BINARY')) {}

    Alert ("linked");

    Conn.Timeout = 20000;

    Content = "-XLuvdG51D_BRiiAda_0y79ImMN_ddtKYzeFFLlu8\n".

    + "Content-Disposition: form-data; name = \ 'file '; filename=\"jdExport.jpg\"\n ".

    + "Content-Type: application/octet-stream\n".

    + "\n"

    + the fContent;

    ;

    CS = "POST/dp/uploadpreview? SessionID = xxxx HTTP/1.1\n.

    + "Content-Length:"+ content.length + "\n";

    + "Content-Type: multipart/form-data; Boundary = XLuvdG51D_BRiiAda_0y79ImMN_ddtKYzeFFLlu8\n.

    + "Host: 127.0.0.1:8081\n".

    + "Connection: Keep-Alive\n".

    + "User-Agent: Apache-HttpClient/4.3.1 (java 1.5) \n".

    + "Authorization: basic TXlTUUxcYWRtaW46\n.

    + "Accept-Encoding: gzip, deflate\n.

    + "\n"

    + content;

    Journal of the var = file ("c:\\tmp\\log.txt");

    log. Open ('w');

    log. Write (cs);

    log. Close();

    Conn.Write (cs);

    response = conn.read (999999);

    Conn.Close ();

    alert (response).

    If (reply.indexOf ('200 OK') > 0) {}

    } else {}

    throw new Error ("createLayout.error: Errormessage of the server" + dataplanServer + ":" + getResponseError (answer) "");

    }

    } else {}

    throw new Error ("createLayout.error: unable to connect to"+ dataplanServer ");

    }

    I found it. I downloaded the source files for the spring framework and the Commons of apache file upload und used the debugger to find out what happened on the server side. Want it tomcat on the other '-' after the file data (and closed chain limit) and I got a CRLF in this position. I just added the "-" at the end of the upload and it worked...

  • How confirm a dead processor and get a new one?

    I have a desktop HP bought three years ago. The specs are below.

    The processor seems to be dead. The hard drive is fine. Food seems to be OK, the Green LED on the back being activated

    The Office was beautiful, but he gave me sounds of fans inside. So I turned off, looked inside to look for trouble, then I turned on it, the screen remained empty forever. The motherboard seems to show signs of life because the light on the Ethernet Jack is on. I open the heatsink and removed the processor and clean dust and residues, but the office is still dead.

    My questions are: how to confirm the processor died before ordering a new, and the second question is what processor to get? Is it a sold by Wal-Mart compatible? It uses the same socket

    http://www.Walmart.com/IP/AMD-Athlon-II-X2-dual-core-260-3.2GHz-processor/15746974

    ------------------------------ desktop specs ------------------------------

    HP Pavilion p6247c-b desktop PC

    Base processor
    Athlon ll X 4 620 (P) 2.6 GHz (95W)
    •4000 MHz HyperTransport 3.0
    •Socket AM3

    Chipset
    GeForce 9100

    Motherboard
    •The: Pegatron
    •Motherboard name: M2N78 - LA
    •HP/Compaq motherboard name: Violet-GL8E

    Memory
    6 GB installed memory
    Maximum allowed 16 GB (4 x 4 GB) (64-bit operating system)
    Speed supported PC2-6400 MB/s
    Pin type 240, DDR2

    The problem was a defective cable connecting the hard drive to the SATA port on the motherboard. I swapped the cables with CD-ROM drive and it works now.

  • displays 2 hearts not 3?

    I do not understand why my computer shows that I have 2 cores and not 3?

    I ran a test that tells me I have 2 CPU? (Tool of diagnosis DirectX 32 and 64-bit tests)

    I have a HP Pavilion a6530f Desktop PC (Vista), features card mother M2N68-(Narra3)
     http://support.HP.com/us-en/document/c01357135 Socket: AM2 +.
    Compatible with the following processors
    Phenom with Quad Core technology (AM2 +)
    Athlon 64 X 2 with Dual Core technology
    Athlon 64
    Sempron, I have a "processor of AMD Phenom 3 X 8450 Triple-Core 2.1 GHz" (Socket: AM2 +)
    http://Products.AMD.com/en-US/DesktopCPUDetail.aspx?ID=425&F1=&F2=&F3=&F4=&F5=&F6=&F7=&F8=&F9=&F10=

    So I think I sold a computer on which the processor was did not supported by its motherboard?

    and it will show only 2 hearts? When I really did 3?

    Well, I almost forgot to ask you to try this.

    1.run/msconfig (or type msconfig in the search and press on enter)

    2. click on the Startup tab

    3. click on advanced options

    4. check the number of processors, if it is enabled, the UN checkbox and restart

    do the same thing again but check the box and select 3 and restart.

  • HP Ultraslim docking station: connection HP ultraslim docking station with 2 external monitors

    Hi, I plan to donate a station host and two monitors to my husband so that he may set up a job at home for its HP Elitebook 840. I would be very grateful if someone can tell me if the HP Ultraslim to home station is compatible with monitors that I have chosen, the dell U2414H. its specifications are 2 connectors HDMI MHL, 1 mini dp 1 dp 1. 2 a, 1 dp MST, 4 USB 3.0 downstream ports and 1 upstream.

    Could someone tell me if I can put in place two of them with the docking station HP Ultraslim, what is the compatibility and what extra cables or adapters, I will need to make them compatible.

    Thanks a ton.

    Do you know what version of the HP Ultraslim Docking station you have?    There are a few specific changes with regard to the 2013 generation from the dock where the docking station has 2 DisplayPorts x instead of an earlier version that had a display port and a VGA.

    If you have the later generation of 2013 docking station and 2 x DisplayPorts, these monitors should be fine.  And you should of course two displayport cables to use with monitors (screens could come with them, but very sure they do).

    The 2013 model looks like this (2 ports to the right of the network socket):

    http://ECX.images-Amazon.com/images/I/61ZSGNoW0sL._SL1500_.jpg

    Whereas the old model looks like this (one DisplayPort, next to the network socket):

    http://content.hwigroup.NET/images/products_xl/172474/HP-UltraSlim-docking-station.jpg

    If the monitors do not come with cables, I highly recommend Monoprice.com as your source for people or ALL wiring.   The link below is for 3 feet of long cables, but according to available to his office, you can cable of 6 to 10 feet.  Below is an example:

    http://www.MonoPrice.com/product?P_ID=13359

    WARNING: I have seen several users posts on the forums here and outside hp directly complain that there are a number of questions using 2 monitors x DisplayPort, even with the 2013 version of the dock.  There is firmware available for the dock updates that help.    I wanted to just throw that out there because he's hit ' n Miss as to whether they work with multiple monitors, and because these screens have no VGA option, you cannot workaround to use VGA and DisplayPort (instead of 2 x DisplayPort) to make it work.

    Brian

  • Motherboard replacement suggestions

    HP Pav 500PC (500-054)

    First mobo replaced by HP under warranty.   Do the same thing again: won't turn on, but no video, no beeps.  Made of standard tests with different monitor, memory deleted (got beeps then), hard drive is ok (out and a little backup files to another machine.)

    Yes, unless someone has an idea, is there a mobo suggested to replace the MS-7778 v1?

    I'm familiar with the ACE Rock N68C - GS FX.

    Thanks, Darryl

    Your motherboard was manufactured by MSI / Micro-Star Int'l
    Name of the motherboard: MSI MS-7778
    Code of HP/Compaq name: Jasmine
    http://h20564.www2.HP.com/hpsc/doc/public/display?docid=emr_na-c03343058

    Micro ATX (mATX) mother used socket AMD FM2 and A75 FCH Chipset AMD processors.
    ===
    IF you want to install a newer motherboard, THEN you is the first step is to assess the characteristics of current motherboard.
    Once it's over, then create a small list of "what's new" you could want.
    NOW you have a starting point for the selection of the DIY motherboard.

    ASRock N68C - GS FX card mother mATX, AMD socket FM3
    http://www.ASRock.com/MB/NVIDIA/N68C-GS%20FX/
    Specifications
    http://www.ASRock.com/MB/NVIDIA/N68C-GS%20FX/?cat=specifications

    1. I'm not AMD, as well as the Intel product strategy.
    2. for an Intel motherboard dedicated to 1150 Socket products (processors 8-series 9-Series).
    3. graphic is integrated with the processor, and I think that the i5 series should be entered baseline.
    4 FUTURE PROOF your replacement.

    A. 16 or 32 GB of capacity (max)
    B. support for Windows 8 (and planned for Windows 10)
    C. Select one Board relatively new (2014 intro)
    D. HDMI and DisplayPort are 2 most popular graphics and video connections for the future.
    E. your MSI Board was a slot PCIe minicards (mSATA card or LAN wireless), the new Council should access the feature.

  • Computer crashes; I kill my motherboard?

    Motherboard: MSI 7778 Jasmine, supports the APU AMD series officially the Trinity APUs.
    Computer: HP Pavilion P6 - http:// 2327c

    I was upgrading my APU of the A8-5500 (originally from the A6 - 5400 k) to the A8-6500. (Yes, I know that the Richland series is not OFFICIALLY taken in charge, naked with me).

    Everything was on, but I heard the CPU fan grind a little, so I opened to tighten a screw loose. He had a screw loose and I shook it, BUT for some reason, I went to remove the fan and remove the old thermal paste off the coast of the APU and the heat sink & fan. I have been using a Solution of isopropyl 50% 50% water.

    When apply the thermal paste and being the fool that I am, the APU was not mounted in the motherboard, but I had him sitting on the side panel that came out my case; Thus, while lifting the APU out of the side panel to the motherboard, my fingers in contact with the dough baths (thermal DYNEX silver paste http://... I picked it up at a local Best Buy) and some of them somehow got on the bottom of the APU. I went to climb the APU and the heat sink & fan. I plugged in the computer.

    Start the computer, but it froze after the HP Logo. I could hear the computer do a click on... Click on... CLICCCCK, click on... Click on... CLICCCCK sound. I opened the computer once again, I found some of the thermal paste on the motherboard itself around the Assembly of the CPU, so I who cleaned with the solution 50-50. I also removed the APU and, with a needle soaked in the solution, I started to clear the pins; I got most of it.

    Same thing happened when I turned on the computer. The computer froze after the HP Logo and I got the click on... Click on... CLICCCK... Once again, open the computer and pulled the A8-6500 and I inserted the A8-5500. SAME THING. I came from research:

    1A obtained 90% isopropyl alcohol and re-cleaned everything.
    2 bought Arctic MX-2.
    3 cleared the CMOS memory on the motherboard.
    4 possible purchase of a new card of mother Socket FM2: http://

    I think that both the A8-5500 and 6500 got short-out, and maybe my motherboard has been damaged.

    Any thoughts?

    If you have done this, you must have facepalmed along the journey.

    Mclightning88, welcome to the forum.

    Get money composed based on the socket can certainly be a fatal error.  However, you can get a couple of smaller brushes that you can buy at a hobby shop.  Use them to try to remove him remains composed of alcohol intake.  Mark cotton pads q - Tip allows to absorb alcohol taking.  You must be extremely careful.  At this point, you have not much to very loose and everything to gain.

    Fortunately, I've never had to use this method, but I heard that this can work.

    The best of luck!

    Please click on "BRAVO", if I helped you and click on "Accept as Solution" If your problem is resolved.

  • How to send data via TCP

    Hi all

    I am trying to write a very simple application that will transfer data via TCP to another computer running a TCP server. (About 3K of data)

    Although I followed the code example in the 4.6 Java Development Guide, page 101, on the use of the socket connections, (http://na.blackberry.com/eng/deliverables/3802/development.pdf) I've been running into questions that data transfer crashes after an undetermined number of bytes.

    Someone at - it sample code to open a TCP connection and sending the data? This seems to be a very common thing to do, so I don't know what is my problem.

    Thank you
    Daniel

    I'm not going to answer your first question, I think that we must resolve this problem before you watch something else (and I suspect they are all related).

    I would almost guarantee that you run your socket send and receive on the thread of events.  The thread of events, that's what treats your interaction Menu, trackball movement etc.  If you perform a long running or blocking on this Thread, your device will freeze.

    Look at the demo of Socket and move your network of transformation to a Thread separate, as does the sample.

    To confirm that the treatment of your socket is executed on the event Thread, you can add this code, run it in the Simulator and watch it in the output window of the debugger and set a breakpoint on the line to System.out.

    If {(Application.getApplication (), isEventThread ())}

    System.out.println ("running in the thread of events and should not be");

    }

  • aplication attact to pocket of debugging does not work

    See examples on my device does not work if I try it on the emulator doesn't do nothing there is no wi - fi is a way to use my internet conection to work with the Simulator to see examples in my phone I can't obtain a license key from rim

    Thank you

    LocalConnection Java.IO.intrruptedioexeption after¨120000 has expired

    Soler r

    The MDS Simulator is also running?  This allows the BlackBerry Simulator to connect via a simulator an SDM Service connection for socket and HTTP connections and is required to use the BlackBerry browser.

  • Licenses that merge with different activation time

    Hello

    I want to merge two different activation time license. I found that there is a solution for this http://kb.vmware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 2006973

    But some question appears in this operation:

    1 time activation may differ by more than 30 days (a license has been purchased and activated in September and the other was purchased and active in June) type of licenses will be the same example - VMware vSphere Standard for 1 CPU with 1 year of support in version 5.5, how support for this looks?

    2. what type of license do need me for server with 2 processors with 8 cores and 192 GB of RAM, this license fits my needs? Is there a single license covering such a feature?

    On the HP site, I found only licnses for 1 CPU http://h30094.www3.hp.com/searchresults.aspx?store_id=11 & search_id = 67 & dept_id = 1328

    3. should I VMware vSphere Standard at least to connect to vCenter VMware?

    THX in advance for any replay :-)

    From vSphere 5.5 all basic and memory restrictions have been removed, and licenses are simply based on the number of processors physical Sockets (see http://kb.vmware.com/kb/2064117).

    What you must ensure is that the license key you want to assign has at least the capacity of the CPU. You can merge the license keys for the same version/edition even with different dates of SnS. However, this will not change SnS and end dates will always be displayed ion the MyVMware portal.

    vCenter Server is optional and licensed separately and is necessary if you want to manage a cluster host, or use additional features (for example, the cloning, live migration,...)

    André

  • Which books are best suited to start learning Java?

    What books complete and up-to-date would be best suited to start learning Java from scratch?

    Thanks in advance.

    I start with the java tutorial online free and see how far you can get with it.

    http://download.Oracle.com/javase/tutorial/

    Edit: I see from your other thread you are interested in the swing also. Swing is not easy, especially if you still don't know the language, tools and the important pieces of the API. But there is also a full Swing tutorial that contains everything you need to know, including lots of copy/paste code example:

    http://download.Oracle.com/javase/tutorial/uiswing/

    You will find that there are pathways for many topics of Java. For example, one on sockets:

    http://download.Oracle.com/javase/tutorial/networking/Sockets/

    Published by: cardan2 on 18-mei-2011 01:01

  • Adobe Air ServerSocket even works only on XP/Vista/7

    I'm having a strange problem with a vent Server I wrote.

    I have an Air application written using Flash Builder 4.  It is a simple HTTP server.  It has the purpose to open a server on a specific port and use a web browser (html and swf) files.

    When I run the air application on my desktop (windows 7, firefox 4.0b11, ie8, flash builder 4 compiled with flex sck 4.1.0) everything works fine.  If I start the server via the Flash Builder debugger or actually do the full packing and install as a standalone air application then run it using the Air runtime as would any user.  I load the server, punch in the address of any place and the loading of the page and the file requested swf display correctly.  When the server is running on my desktop I tested clients such as Windows XP and Vista with IE8, HTC Android Evo4g phone and the Playstation 3 browser.  Any client tested with the server running on my desktop applications are dealt with properly and pages/FSV load and display correctly.

    The problem is when I run the air on another computer application.  When I package it and install on one of my two systems test (Windows XP and Windows Vista) things start to go wobbly.  Air app charges on two test systems, but when a client tries to use their web browser to request a page things are not properly displayed.  The customer can load the HTML fine but the swf that it receives from the server is not displayed.  I can check the log on the State Server and see HTTP GET processing and the sent file.  However, the browser just displays a blank box where the SWF file must be.  With the server running on one of my two test boxes (XP and Vista), the same customers who can connect and view the html code and swf shipped from Server experience this issue.

    I think I've eliminated application of browser such as the problem of testing different browsers on different operating systems on each of the test facilities.  As far as I know, the problem is on the side of the application server.  The server uses the SocketServer class to listen to a connection and then writes the HTML headers and content to the socket manually, I don't use any external libraries to write on the socket.

    Here is the code to write on the socket when a swf file is requested.

    {

    var content: ByteArray = new ByteArray();

    var stream: FileStream = new FileStream();
    Stream.Open (file, FileMode.READ);
    stream.readBytes (content);
    Stream.Close ();

    socket.writeUTFBytes ("HTTP/1.1 200 OK\n");
    socket.writeUTFBytes ("Content-Type: application/x-shockwave-flash\r\n");
    socket.writeUTFBytes ("Content-Length:" + content.length + "\r\n\r\n");
    socket.writeBytes (content);

    }

    I don't think that the problem is with the writing of decision-making because it works on my desktop but not when the server runs on another.  I wonder if the problem is with a dependence on external system.  Are there external libraries, visual c ++ runtimes, libraries tcp/ip used by Air to meet the demands faced on different systems of exploitation/versions?  I searched the web and navigate adobe live docs for a few hours on this but can't find a solution anywhere.  If we need more details, please let me know.  Any help would be appreciated.

    Hi Tim,.

    I was going to suggest you do exactly that, having the client to send a message that the load is complete.  I know that's not optimal, but unfortunately there is not a better solution right now. We are aware that this is missing and we are working on a solution for a next version.  You can follow this bug to http://bugs.adobe.com/jira/browse/FP-6

    Thank you

    Chris

  • Best way to implement the FMS?

    I'm new to FMS and a little confused on how I should configure things.

    Right now, I have a web server running IIS and a database server. Initially, I install FMS 3.5 on the web server and set the port 1935.  However, many of my users have this port is blocked, so this isn't the best option.

    Should I install it on the database server so I can put port 80?

    In addition, FMS works as a stand-alone server?  For example could you have two servers--one with IIS and the other with FMS.  When someone goes to the web page of IIS it can pull in videos from the FMS server?  I guess he can, but I have not found any information about it, so any help is greatly appreciated.

    FMS is a stand-alone server, then Yes, your .swf and html can be served from a server and your FMS can be on another server (or another network besides).

    That said, if you have system resources and bandwidth to spare on your server computer HTTP is running, you can install FMS on the same machine. You just need to add a second IP address of your network interface. Link IIS IP and FMS for the other. If you run IIS 6 or newer, you will need to disable socket pool (http://www.netfxharmonics.com/2007/07/Disabling-IIS6-Socket-Pooling). If you do not, IIS will continue to bind to all IP addresses.

Maybe you are looking for

  • Recover lost email

    Turned off my computer that my email was there. Turned on my computer program and electronic mail was different and all e-mails have disappeared. What happened to my profile e-mail and besides what happened to thunderbird to change the way it looks.

  • How to stop and restart a .vi with a button front?

    Hey guys, a newbie here. I have a .vi with a stacked sequence. First frames are few parameters (LIN master node) and initialization of hardware and hardware data should pass on (the frame response table). In the next section, there is a loop in which

  • Cannot restore file bkf NAS to Vista Home Premium disk XP

    I have a HP Pavilion a6220n PC desk top running Vista Edition Windows Home Premium.  Exploitation is corrupt is a couple of weeks, and I haven't had a recent backup of the C drive.  (I know...)  In any case, I could take the Vista machine's hard driv

  • Items not found?

    I see some files when I SEARCH, but when I try to delete them, I get the message "article not found". They are on my computer or not? If they are, how can I get rid of them?  If revised, what gives?

  • Printer stay connected to Windows 8

    I have Windows 8 Compaq laptop. I also have a HP ENVY 4501 e-all-in-one printer. I had this problem with my printer last too, but now I am finally tired of it. Whenever I close the lid of my laptop or the powers of the printer off / sleep it disconne