Socket connection - Available Port Numbers

Hi,
I am trying to connect to a server running on Unix through my NT client. This is being done via socket connection and by supplying IP Address of the machine plus the port number.
My server is running on Unix, Solaris 8, Ultra 5 machine. I want to know if there is some allowable range of Port Numbers on the Unix machine?
Or is it that I can use any number starting from 1 to infinite as my port number?
Thanks.

The ports below 1024 are reserver for only the "root" user and 65536 is usually the max port
number available. Ports below 1024 are also reserved for a user in the Administrators group on NT and W2K.
Actually, the maximum port number is 65535 since IPv4 port numbers are 16 bit quantities and that is the maximum value of a 16 bit quantity.

Similar Messages

  • Cannot open socket connection on port 443

    Hi!
    Our server is running on Port 443.
    When I try to Connect from the BlackBerry 9300, an exception is thrown "cannot open socket connection on port 443"
    Can any one please help me in finding the solution to enable the port 443.
    Thank you in advance!
    Regards,
    Vinay

    I assume that you have verified that you can login to the ftp site using a regular ftp client (e.g. Fetch) on the Mac?

  • Available port numbers

    hello,
    can anyone help me to found the oracle port reserved numbers
    eg 1521,1523 for listener etc..
    thanks in advance

    Did you check the user guide?
    http://download-uk.oracle.com/docs/cd/B19306_01/install.102/b14201/ports.htm
    C.

  • Can a socket connection be created inside a Timeline to port 23?

    Is there a security restriction or some other reason why I always get a java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)
    when I try to open a socket inside a function in a Timeline to port 23? The connection works fine to the host if the code is not is not inside a Timeline. It also seems that a socket connection to port 80 works okay too.
    Thanks for any help in advance.
    Regards,
    Richard

    Here is the Timeline code:
    var addr:InetSocketAddress;
    var sConn:Socket;
    var reader:BufferedReader;
    var s:String;
    Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: [
    KeyFrame {
    time: 10s
    action: function() {
    try {
    addr = new InetSocketAddress("somehost",23);
    sConn = new Socket();
    sConn.connect(addr);
    reader = new BufferedReader(
    new InputStreamReader(sConn.getInputStream()));
    // reader.readLine(); // throw away first line
    s = reader.readLine();
    bindTemp = response.getResponse("$0001").getTemperature();
    bindVolt = response.getResponse("$0001").getVoltage();
    } catch (e:Exception) {
    System.err.println(e);
    }.play();
    The ConnectionRefused error occurs only when the NetBeans Project Application Properties "Draggable Applet" checkbox is checked ( which is the default ). Once I uncheck it, the error goes away.
    -Richard

  • Socket connection

    Hi,
    I want to connect swf file running in www.xxx.com via socket
    to www.xxx.com:25
    My crossdomain.xml looks like:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "
    http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="www.xxx.com/*" to-ports="25"
    />
    </cross-domain-policy>
    But when i do remote debug i see this error:
    Se ha detenido la conexión con www.vescovoweb.com:25 -
    no se permite desde
    http://www.xxx.com/ct.swf
    securityErrorHandler: [SecurityErrorEvent
    type="securityError" bubbles=false cancelable=false eventPhase=2
    text="Error #2048: Violación de la seguridad Sandbox:
    http://www.xxx.com/ct.swf no
    puede cargar datos desde www.xxx.com:25."]
    Anyone can help me?

    It's the socket constructor:
    public function SendMail(host:String = null, port:uint = 0)
    try
    Security.loadPolicyFile("
    http://" + host + "/crossdomain.xml");
    } catch (error:Error){
    trace('NO crossdomain.xml\n'+error.message+'\n');
    socket = new Socket();
    configureListeners(socket);
    try {
    trace("Trying to connect to " + host + ":" + port + "\n");
    socket.connect(host, port);
    } catch (error:Error) {
    trace(error.message + "\n");
    socket.close();
    In the third row i load the policy file but i suppose the
    loading is fine because flash don't tell me any error when it's
    load.
    Any suggestion?

  • Multiple socket connection in TC65

    Hello!
    I connect TC65 with server by socket connection on port 23. I close this socket, output and input streams as well. Because I've read some information from server I want to connect to another device using socket connection on port 43 for example, but it seems it doesn't work. I guess in some way it could be done because I closed previous connection. Any advise?
    Luke

    ok. dear
    my another id is      [email protected]
    Right, I'm getting tired of this already.
    NO, I'm not going to send you any code, you lazy nitwit. Neither will anybody here.
    Your use of the imperative form in your question is rude. You may talk like that to your colleagues, but in a forum where people answer questions in their spare time and on a voluntary basis this is inacceptable.
    You didn't even bother to say "please", at the least. Not that this would have changed much, but at least you wouldn't have been barking.
    [url http://www.catb.org/~esr/faqs/smart-questions.html]This document might provide you some orientation.
    As for your problem, first find out what exactly it is you want to do. Search the web, as kajbj counselled, it's quite a common task. If you have a specific problem, ask. But, take my advice and never, never ever ask people to "send you code" in a forum.

  • Open a Socket Connection

    I have an RFID reader that has an internal memory bank that
    stores rfid scans. From speaking to the company in order to get the
    data off I need to create a socket connection to port 8080 and send
    RQL (which is similar to sql) and then it will send me back piped
    results.
    Can anyone assist me on how to open a connection to ip
    192.168.1.139 port 8080 and send this
    SELECT read_count, protocol_id, antenna_id, id FROM tag_id
    WHERE protocol_id='GEN2' set time_out=8000
    and then output the results it returns.
    Thanks in advance!

    Thanks for your response, ok i've change the code to use the
    following, but now it just hangs... i.e. it looks like it's working
    in the browser but then just times out.
    <cfsetting requesttimeout="1000">
    <cfflush interval="5">
    <!-- begin code sample -->
    <cfset serverStruct = structNew() />
    <!-- the variables -->
    <cfset serverStruct.serverIp = "192.168.1.139" />
    <cfset serverStruct.serverPort = "8080" />
    <cfset serverStruct.portConnected = "" />
    <cfset sLines = "">
    <!--- Create the socket object --->
    <cfset objSocket = CreateObject("java", "java.net.Socket")
    />
    <!--- Connect --->
    <cftry>
    <!--- Set up socket to IP:port of remote server --->
    <cfset objSocket.init(serverStruct.serverIp,
    serverStruct.serverPort)/>
    <cfset serverStruct.portConnected =
    objSocket.isConnected()>
    <!--- Did we connect? --->
    <cfif serverStruct.portConnected>
    <!-- create the string. Note the use of quotes to escape
    quotes in a string -->
    <cfset mySendData = "SELECT id FROM tag_id WHERE
    protocol_id='GEN2';">
    <!--- obtain the streams --->
    <cfset input = objSocket.getInputStream()>
    <cfset output = objSocket.getOutputStream()>
    <!--- set up buffered reader for the socket; it will read
    character data
    into a buffer until until enough of it can be processed
    efficiently. However,
    a buffered reader reads a reader object, hence we first have
    to convert the
    inputstream into a reader --->
    <cfobject class="java.io.BufferedReader" name="brObj"
    action="CREATE" type="JAVA">
    <cfobject class="java.io.InputStreamReader" name="isrObj"
    action="CREATE" type="JAVA">
    <cfset streamReader = isrObj.init(input)>
    <cfset dataBuffer = brObj.init(streamReader)>
    <!--- send the data to the remote server --->
    <cfobject class="java.io.PrintStream" name="pwObj"
    action="CREATE" type="JAVA">
    <cfset writer = pwObj.init(output)>
    <cfset sentData = writer.println(mySendData)>
    <!--- Get the response from the server --->
    <!---<cfset response = dataBuffer.readLine()>
    <cfset sLines = "">--->
    <cfset sLine = dataBuffer.readLine()>
    <cfloop condition="#isDefined('sLine')#">
    <cfset sLines = "#sLines##sLine#">
    <cfset sLine = dataBuffer.readLine()>
    </cfloop>
    <!--- Close the streams and the connection --->
    <cfset streamReader.close()>
    <cfset dataBuffer.close()>
    <cfset writer.close()>
    <cfset objSocket.close()>
    </cfif>
    <cfcatch type="any">
    something went wrong.
    </cfcatch>
    </cftry>
    <cfdump var="#sLine#">

  • Problem with socket programming-connecting to port 13

    Hi, I am learning JAVA, and we are on the subject of sockets. I am trying to make this program to connect to port 13, get the time, and print it to the console. This is my code:
    import java.io.*;
    import java.net.*;
    public class temp {
         public static final int PORT = 13;
         public static void main(String[] args) {
              Socket s = null;
              String line = null;
              try {
                   s = new Socket("localhost", PORT);
                   DataInputStream sin = new DataInputStream(s.getInputStream());
                   line = sin.readLine();
                   if (line != null) System.out.println(line);
              catch (IOException e) {System.err.println("!" + e);}
              finally {
                   try { if (s != null) s.close(); }
                   catch (IOException e2) {}
    And this is the output:
    !java.net.ConnectException: Connection refused: connect
    What should I do. I found that the problem is with the server I am connecting to and I tried connecting to dif. computers, or to stuff online, and nothing works.
    Any suggestions for me?
    Forgot: I tried this on both a windows XP and Vista
    Edited by: xpatrickerx on Mar 23, 2008 8:12 PM
    Tampering with it, I find that the error occurs on the following line:
    s = new Socket("localhost", PORT);
    Edited by: xpatrickerx on Mar 23, 2008 8:13 PM

    So I finally found how to use printStackTrace and here is what it gives when:
    1) I use my own computer:
    java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at temp.main(temp.java:11)
    2) I use something else:
    java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at temp.main(temp.java:11)
    Again, thanks

  • Connect Flash to Serial Port with Local Socket Connection

    Hey all,
    So, I am trying to connect a Flash movie to a serial port
    and have it react to the input coming in. Of course, Flash does not
    have this capability built in, so I need a workaround. I also
    program in Director, and there are easier ways to deal with this
    there, but since there hasn't been an update in years, and for
    other technical reasons, I would like to use a pure Flash program.
    I also need to take advantage of some of the new hardware
    acceleration improvements and horizontal sync issues that come with
    running the Flash player full screen. So, there are some tools out
    there that will let me stream the input from the serial port to a
    web address. I figure I could use the local address and assign a
    port number, then use Flash to create a local socket connection. I
    am having issues opening ports on my computer, and a few other
    things, but in theory, I think it should work. I know that I won't
    get all the answers here, but if anyone has done anything of the
    sort, or might know of some similar projects, it would really help.
    I am more of a Director/Flash programmer, and not so much one on
    the system level. So, opening local sockets, etc, while I am sure I
    can figure it out, is still a bit beyond me. Thanks all!
    - Bruce

    You may want to look into flash remoting, which would allow
    you to push content to the flash movie. You could then write a
    proxy between the source of your stream and flash the remoting
    server.

  • Problem: Socket connection is not creating in machine, through utility program (MFC Dll), on ListDisplay service port - 3334 (on separate machine), while we are able to telnet on same ListDisplay service port - 3334 from same issue machine on same time

    Problem: Socket
    connection is not creating in machine, through utility program (MFC Dll), on ListDisplay service port - 3334 (on separate machine), while we are able to telnet on same ListDisplay service port - 3334 from same issue machine on same time
    Environment: -
    OS:
    Windows XP SP2/7
    Code:
    VC 6.0
    Dll: MFC
    Problem Description: -
    We have written a utility program which create socket (Using windows standard method [MFC]), and then make connection with another service (List Display) running
    on port 3334 in different machine and retrieve the required list data. This program was working fine in almost all the machines.
    But, we have received a severe intermittent issue on two machines. Client is facing issue in displaying the list data from port 3334.
    Attempt: -
    First we tried to debug code, and we come to know that socket is not creating in utility program. So we tried to telnet on ListDisplay service port 3334 and we were surprised that we were able to telnet, then we opened some more
    telnet window on same port 3334 around (6 to 8) window, and each cmd connected properly. But we were not able to create socket from utility program.
    Problem is severe because issue is intermittent.
    We have tried all the way, but we are not able to figure it out, that what can be the exact problem and what are the conditions, when utility program will not
    connect with ListDisplay service on port 3334.
    Kindly assist to resolve this issue. For any help, we would be really thankful.

    Hi,
    According to your description, it seems that you have created an utility program which is making connection with another service port 3334, however, two clients are facing issue in display the data list from port 3334.
    Port: 3334/TCP
    3334/TCP - Known port assignments (1 record found)
    Service
    Details
    Source
    directv-web
    Direct TV Webcasting
    IANA
    Since the port 3334 is used by directv-web service, I'd like to suggest check this service it is working well on the problematic clients.
    1. The client can be resolved in DNS well? Please run "nslookup" in the prompt command.
    2. Is there any 3rd party application interrupting? Do test in clean boot.
    2. Strongly suggest you run process monitor tool to analysis it.
    I am looking forward to your reply if you have any updated on your side.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Different port numbers available in xi

    Hi
    while I was going through the forum I have come across  different port numbers like j2ee port, http port, smpt etc. Could you please summarize what are all the different ports that xi has to communicate and how to find that prot numbers. I mean different transactions to see the same.
    thanks
    kumar

    Hi,
    The following instances will be created as per the type of installation.
    Abap+java system = 
    /usr/sap/<SID>/DVEBMGS<<b>NR</b>>
    /usr/sap/<SID>/SCS<<b>NR1</b>>
    Stand alone java system =
    /usr/sap/<SID>/JC<<b>NR</b>>
    /usr/sap/<SID>/SCS<<b>NR1</b>>
    All the port numbers are determined by the NR and not by NR1.
    You will have JC<NR> when you have a standalone Java system installed and DVEBMGS<NR> when you have a ABAP+JAVA system installed. Both of these will not exist together for a particular Installation.
    And you will have SCS instance in both the cases i.e if you have Java Addin( ABAP+JAVA) or a Standalone Java System.
    Thanks,
    Tanuj

  • Problem with socket connections through a proxy server.

    People,
    I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
    System.setProperty("socksProxyPort", port);
    System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
    s = new Socket(this.getHost(), port);It hangs.
    I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.

    Is the proxy on another machine? Try it's IP. If
    not, replace 'proxy' with 'localhost'.
    - SaishYes, it is another machine.
                byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
                s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
                s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung.

  • Problem with socket connection

    have my gps reciver connected to the usb port - i have a daemon gpsd running which makes data available on tcp port 2947 for querying. when i do telnet, it gives proper data.
    but when i open a socket connection using java, it does not print anything as output. actually telnet asks for an escape charatcer so i am sending "r" initially to the server but still the program does not print anything as output.
    here is my java code -
    import java.io.*;
    import java.net.Socket;
    public class test2
    public static void main(String[] args)
    try
    Socket s = new Socket("localhost",2947);
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
    s.getOutputStream())),true);
    out.println("r");
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    String line;
    while(true)
    line = in.readLine();
    System.out.println(line);
    catch (Exception e)
    or sometimes it even shows error as
    Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    and this is the output which i get on telnet -
    ot@localhost ~]# telnet localhost 2947
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    r
    GPSD,R=1
    $GPRMC,000212,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1A
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32
    $PGRME,400.00,0.00,0.00*7B
    $GPRMC,000213,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1B
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32
    $PGRME,400.00,0.00,0.00*7B
    $GPRMC,000214,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1C
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32

    Actually the problem does not seem to be in the code because i tried some basic client server programs (without any gpsd etc in picture) and even they are not working in linux though they work perfectly in windows (on the same machine). In linux it shows exception
    My socket programs dont work in linux it shows error -
    ot@localhost winc]# java parser
    Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at java.net.Socket.<init>(Socket.java:309)
    at java.net.Socket.<init>(Socket.java:124)
    at parser.main(parser.java:10)
    i have removed the firewall settings etc and it still doesnot work in linux
    what could be the cause for this?
    Sowmya

  • Establishing a socket connection between a .swf file and a socket-test program (TCP/IP builder - Windows), in AS3.

    I have an issue with a college project I'm working on.
    Using Actionscript 3, I made a simple .swf program, an animated, interactive smiley, that 'reacts' to number inputs in a input-box.
    For the sake of the project, I now need to make the framework for establishing a socket connection with the smiley .swf, and another program.
    This is where I encounter issues. I have very little knowledge of AS3 programming, so I'm not certain how to establish the connection - what's required code-wise for it, that is.
    To test the connection, I'm attempting to use the "TCP/IP builder" program from windows, which lets me set up a server socket. I need to program the .swf file into a client - to recognize it, connect to it, then be able to receive data (so that the data can then be used to have the smiley 'react' to it - like how it does now with the input-box, only 'automatically' as it gets the data rather than by manual input).
    My attempts at coding it are as follows, using a tutorial (linked HERE):
    //SOCKET STUFF GOES HERE
        var socket:XMLSocket;        
        stage.addEventListener(MouseEvent.CLICK, doConnect); 
    // This one connects to local, port 9001, and applies event listeners
        function doConnect(evt:MouseEvent):void 
        stage.removeEventListener(MouseEvent.CLICK, doConnect); 
        socket = new XMLSocket("127.0.0.1", 9001);   
        socket.addEventListener(Event.CONNECT, onConnect); 
        socket.addEventListener(IOErrorEvent.IO_ERROR, onError); 
    // This traces the connection (lets us see it happened, or failed)
        function onConnect(evt:Event):void 
            trace("Connected"); 
            socket.removeEventListener(Event.CONNECT, onConnect); 
            socket.removeEventListener(IOErrorEvent.IO_ERROR, onError); 
            socket.addEventListener(DataEvent.DATA, onDataReceived); 
            socket.addEventListener(Event.CLOSE, onSocketClose);             
            stage.addEventListener(KeyboardEvent.KEY_UP, keyUp); 
        function onError(evt:IOErrorEvent):void 
            trace("Connect failed"); 
            socket.removeEventListener(Event.CONNECT, onConnect); 
            socket.removeEventListener(IOErrorEvent.IO_ERROR, onError); 
            stage.addEventListener(MouseEvent.CLICK, doConnect); 
    // Here, the flash tracks what keyboard button is pressed.
    // If 'q' is pressed, the connection ends.
            function keyUp(evt:KeyboardEvent):void 
            if (evt.keyCode == 81) // the key code for q is 81 
                socket.send("exit"); 
            else 
                socket.send(evt.keyCode); 
    // This one should handle the data we get from the server.
            function onDataReceived(evt:DataEvent):void 
            try { 
                trace("From Server:",  evt.data ); 
            catch (e:Error) { 
                trace('error'); 
        function onSocketClose(evt:Event):void 
            trace("Connection Closed"); 
            stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp); 
            socket.removeEventListener(Event.CLOSE, onSocketClose); 
            socket.removeEventListener(DataEvent.DATA, onDataReceived);
    Trying to connect to the socket gives me either no result (other than a 'connection failed' message when I click the .swf), or the following error:
    Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///C|/Users/Marko/Desktop/Završni/Flash%20documents/Smiley%5FTCP%5FIP%5Fv4.swf cannot load data from 127.0.0.1:9001.
        at Smiley_TCP_IP_v4_fla::MainTimeline/doConnect()[Smiley_TCP_IP_v4_fla.MainTimeline::frame1:12] 

    Tried adding that particular integer code, ended up with either errors ("use of unspecified variable" and "implicit coercion") , or no effect whatsoever (despite tracing it).
    Noticed as well that the earlier socket code had the following for byte reading:
    "sock.bytesAvailable > 0" (reads any positive number)
    ...rather than your new:
    "sock.bytesAvailable != 0" (reads any negative/positive number)
    Any difference as far as stability/avoiding bugs goes?
    So then, I tried something different: Have the program turn the "msg" string variable, into a "sentnumber" number variable. This seemed to work nicely, tracing a NaN for text (expected), or tracing the number of an actual number.
    I also did a few alterations to the input box - it now no longer needs the 'enter' key to do the calculation, it updates the animation after any key release.
    With all this considered and the requirements of the project, I now have a few goals I want to achieve for the client, in the following order of priority:
    1) Have the "sentnumber" number variable be recognized by the inputbox layer, so that it puts it into the input box. So in effect, it goes: Connect -> Send data that is number (NaN's ignored) -> number put into input box -> key press on client makes animation react. I optionally might need a way to limit the number of digits that the animation reacts to (right now it uses 1-3 digit numbers, so if I get sent a huge number, it might cause issues).
    - If the NaN can't be ignored (breaks the math/calculus code or some other crash), I need some way of 'restricting' the data it reads to not include NaN's that might be sent.
    - Or for simplicity, should I just detect the traced "NaN" output, reacting by setting the number variable to be "0" in such cases?
    2) After achieving 1), I'll need to have the process be automatic - not requiring a keyboard presses from the client, but happening instantly once the data is sent during a working connection.
    - Can this be done by copying the huge amounts of math/calculus code from the inputbox layer, into the socket layer, right under where I create the "sentnumber" variable, and modifying it delicately?
    3) The connection still has some usability and user issues - since the connection happens only once, on frame 1, it only connects if I already have a listening server when I run the client, and client can't re-connect if the server socket doesn't restart itself.
    I believe to do this, I need to make the connection happen on demand, rather than once at the start.
    For the project's requirement, I also need to allow client users to define the IP / port it's going to connect to (since the only alternative so far is editing the client in flash pro).
    In other words, I need to make a "Connect" button and two textboxes (for IP and port, respectively), which do the following:
    - On pressing "Connect", the button sets whatever is in the text boxes as the address of the IP and port the socket will connect to, then connects to that address without issues (or with a error message if it can't due to wrong IP/port).
    - The connection needs to work for non-local addresses. Not sure if it can yet.
    - On re-pressing connect, the previous socket is closed, then creates a new socket (with new IP/port, if that was altered)
    It seems like making the button should be as simple as putting the existing socket code under the function of a button, but it also seems like it's going to cause issues similar to the 'looping frames' error.
    4) Optional addition: Have a scrolling textbox like the AIR server has, to track what the connection is doing on-the-fly.
    The end result would be a client that allows user to input IP/Port, connects on button press (optionally tracking/display what the socket is doing via scrollbox), automatically alters the smiley based on what numbers are sent whilst the connection lasts, and on subsequent button presses, makes a new connection after closing off the previous one.
    Dropbox link to new client version:
    https://www.dropbox.com/s/ybaa8zi4i6d7u6a/Smiley_TCP_IP_v7.fla?dl=0
    So, starting from 1), can I, and how can I, get the number variable recognized by "inputbox" layer's code? It keeps giving me 'unrecognized variable' errors.

  • File Connection and Socket Connection in nokia 7710

    Hello,
    i want to transfer some data from my PC to Nokia 7710 either using File Transfer or socket connection
    For file transfer, where do i need to put my file i.e. which files does nokia 7710 allow j2me programs to access? Is is ok if the file i transfer is a plain txt file? i am using jsr 75 api for reading from the file, so what file location will i give in my program, in Nokia 7710, there are two memory drives Device and Memory Stick, so how can i access these files via a j2me program running on the cell?
    If i use socket connection, how will the phone recognize PC's ipaddress? Do i need to configure it? Also my Nokia 7710 is connected to the PC via a cable attached to USB port, so what port numbers do i specify in my j2me client program that will run on the phone and normal java server program that will run on the PC
    please help me out, this is very important for me
    thank you

    Hi Steve, Would you mind to give a a piece of code to solve this problem
    This is my code :
                              is  = sc.openInputStream();
                os = sc.openOutputStream();
                os.write(("HELO there" + "\r\n").getBytes());
                os.write(("EHLO" + "\r\n").getBytes());
                os.write(("AUTH LOGIN" + "\r\n").getBytes());
                os.write(("dHVnYXNha2hpci50cmlhZGl0eWFAZ21haWwuY29t" + "\r\n").getBytes());
                os.write(("dGEuZW1haWxjbGllbnQ=" + "\r\n").getBytes());
                os.write(("MAIL FROM:<"+ from +">\r\n").getBytes());
                os.write(("RCPT TO:<"+ to + ">\r\n").getBytes());
                os.write("DATA\r\n".getBytes());
                       // stamp the msg with date
                os.write(("Date: " + new Date() + "\r\n").getBytes());
                os.write(("From: "+from+"\r\n").getBytes());
                os.write(("To: "+to+"\r\n").getBytes());
                os.write(("Subject: "+subject+"\r\n").getBytes());
                os.write((msg+"\r\n").getBytes()); // message body]
                os.write(".\r\n".getBytes());
                os.write("QUIT\r\n".getBytes());
                              StringBuffer sb = new StringBuffer();
                              int ch = 0;
                while((ch = is.read()) != -1) {
                   sb.append((char) ch);
                si.setText("SMTP server response - " + sb.toString());but it doesn't work,...
    i try to connect smtp gmail with smtp server : smtp.gmail.com and port : 465 (Use SSL)
    regards
    triaditya

Maybe you are looking for