How to get available TCP port

In  the server, I use StreamSocketListener's BindServiceNameAsync() to bind the port, but i don't know which port is available.
How can i get an available port ?
mStreamSocketListener.BindServiceNameAsync("123");

Hi oneonce,
Is that means you would like to know if "123" port is available on current OS programmatically by Windows Store App?
Base on my understanding, Windows Store App runs in a sandbox mode to ensure safety, we do not have any permission to know if system have the Tcp port open, meanwhile TcpConnectionInformation
Class does not supported in Windows Store App.
The answer for this question is we do not have any way to detect that.
However I'm not sure why you ask such question, let's say if we know that "123" port is not available in local machine, will you change to another TCP port?
--James
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.

Similar Messages

  • How to get the WD port number of the actual system?

    Hello everybody,
    In my application I'm calling a Sap Gui transaction through an ITS WebGUI link that is generated dynamically by an action method. Works find so far.
    However, as the code has to run on various systems (development, test, production) I also have to generate the system and port name dynamically. System name is no problem, but how can I get the WD port of the actual system? Is there any method or variable for that? Couldn' find anything so far...
    Thanks in advance for any help!

    Hello,
    As Thomas mentioned, you have to use the utility class to construct the URL for any application.
    you have two options here
    Option 1 -> Prefix your generated WebGUI link with '/' and pass it to the method CL_URL->HOST in the URL parameter. this method will prefix the corresponding http:<host>:port to the passed in URL.
    Option 2 -> you can directly use the method CL_URL->ITS to generate your entire web GUI link.
    BR, Saravanan

  • How to get available physical channels by DAQmx in VIs?

    I can get available DAQ devices by calling DAQmx System property. What should I do if I want to get all available physical channels in my VI?
    My NI DAQ version is 7.3, and my LabVIEW version is LabVIEW Professional 7.1.
    Thanks!

    There really isn't a great way to do this. I've attached a zip file with a couple of VIs that might give you a an idea or two about how you might want to go about it. Hope one of these helps!
    -Alan A.
    Attachments:
    Chanel Info.zip ‏23 KB

  • How to Get Availability date? while doing MIGO

    Hi Guys ,
    Can any body tell me how can i get Availability Date while doing MIro ?
    1.I have to get Availability date
    2. and that Availability date is Production date + 8 days ?
    how can i implement this one ? is there any relevent user exits is there ?
    please give me some input?
    regards
    Prabhu

    Hi Guys ,
    Can any body tell me how can i get Availability Date while doing MIGO ?
    1.I have to get Availability date
    2. and that Availability date is Production date + 8 days ?
    how can i implement this one ? is there any relevent user exits ?
    please give me some input?
    regards
    Prabhu

  • How to get 2 lans ports working on K8N Neo2 platinum

    I can only get the one lan port working which is the realtek device. Ive tried installing drivers for the marvel lan but it doesnt show up in device manager. Can any one tell me how i get this second lan port working.
     

    Quote from: Justmeto on 02-July-06, 05:02:54
    I can only get the one lan port working which is the realtek device. Ive tried installing drivers for the marvel lan but it doesnt show up in device manager. Can any one tell me how i get this second lan port working.
    The other network interface is by nVidia -- the Marvel part is just the PHY for the nForce3 NI -- and the drivers should install with the nVidia driver install.  Which nVidia driver package are you using?  People have had NI trouble with the 5.11 pack - personally I use the 5.10 pack with the 4.79 IDE/SATA drivers which you should be able to find here: [urlhttp://downloads.guru3d.com/download.php?id=19[/url].  In BIOS Setup under Integrated Peripherals, what's labeled MAC Lan(nVIDIA) is the one you want to make sure is on Auto.

  • How to get the server port and id from the Initialcontext

    hi
    i know that i can get the server port and id where the jndi service is listening from the InitialContext ( when i create InitialContext ic = new InitialContext(); from within a EJB. ). Does this work on any application server and where (at what position is for example the port) in the Enumeration at the ic are the different things put?

    I would usually just get the PROVIDER_URL property from the InitialContext and use that to determine the location of the naming service:
    String providerURL = (String)ic.getEnvironment().get(Context.PROVIDER_URL);You'll then need to parse that string to obtain the port and the server name. For example:
    // Assume that the provider URL is of form "protocol://server:port"
    int serverStartIndex = providerURL.indexOf("://" + 3);
    int serverEndIndex = providerURL.indexOf(:, serverStartIndex);
    String server = providerURL.substring(serverStartIndex, serverEndIndex);
    String port = providerURL.substring(serverEndIndex + 1);It's a fairly universal approach but there'll doubtlessly be some special cases (for example, the provider URL could be null and the InitialContextFactory class defaults it).
    You might have to adjust the server/port parsing stuff a bit as I just made that up and your URL might not conform to the pattern I described.
    Hope this helps.

  • How to get Networking Switch Port Configuration (I guess SNMP4j will help)

    Greetings :)
    We have extreme Summit 450e switches installed in our organization. approximately 2000 desktops are connected to these switches.
    Now, I want to make a utility to get info from these switches, for example, which IP, MAC etc is running on a particular switch port. I want to extract these kind of info from all switches and export it into a database.
    Any help, how to start this work.
    Thanks...

    > Any help, how to start this work.
    First research what programmable interfaces it supports.  That includes any management API including SNMP, TCP and HTTP.
    And then from that figure out what you want to do with it.
    After you do both of the above then you start looking to java to program the solution.

  • How to get available quantity in Inventory levels  for all materials

    Hi..All
    I am Abap Developer and i have a Requirement that to Print a report that Displays " Inventory levels (available quantity) for all materials"
    1) What tables can i use to retrive the data to get the Inventory levels (available quantity) for all materials.
    2).What are the fields can used in that tables that use ful for end user.
    Thank you,
    Madhu .
    Edited by: madhubabu rao on Oct 15, 2008 9:10 AM

    Hi,
    I'm not sure what you mean when you are speaking about inventory levels and available quantity.
    I mean that you may have stock of 100 pcs of a certain material but from an open PrdOrd can come a reservation for this component (e.g. 20 pcs) that reduces this the available quantity (to 80 pcs).
    If you want only the stock levels, you don't have to write any ABAP code, since MB52 report is designed for this purpose.
    If you want to know the available stock (considering requirements (PIR, DepReq, SO), and stock-like MRP elements (PldOrd, PurReq, PrdOrd, PO, etc)) you should check report MD04 and examine how it works, which tables it uses (ST01).
    http://iorboaz.blogspot.com/2005/04/get-md04-data.html
    Regards,
    Csaba
    Edited by: Csaba Szommer on Oct 15, 2008 9:34 AM
    Edited by: Csaba Szommer on Oct 15, 2008 9:34 AM

  • How to get available disk space for a disk in the system ?

    hi all,
    I need to figure out the available disk space for a particular disk before I can write my file to a directory in the disk. I do this to avoid unsufficient disk space problem in my program. May I know how can I do this in Java ? I look at the API function for java.io.File class but there isn't any function to check disk space. I would appreciate any help from fellow Java developers. Thanks a million.
    regards,
    tuck meng

    You cannot do this in purely platform independent way.
    You can use System.exec to run native OS utilities like df and parse the output, but then you have to knwo which platform your program is running on, or build in some automatic detection of OS and have corresponding native calls for each likely one.
    BTW. even if you get a number of free bytes on disk that's larger than the size of the file you want to write this is no guarantee that there will be enough diskspace for your file, because another process might write to the disk in the meantime. So you will have to do proper error handling and recover gracefully from the disk full sitution no matter what.

  • How to get available fields list from web service

    hi,
    i'm using webservices to create ,update and deleting a alead.
    what i want is i want all the id of available fields in my account ?
    how acn i get those id's ?
    regards,
    praneeth

    hi,
    thank u for reply.
    i would like to create a servlet to insert alead to OCRM,
    but for that the user selects the fields he want to insert and provides corresponding values to those selected fields.
    so that i need to display all the fields available in my OCRM account.
    regards,
    Praneeth

  • Can i get available servers ports on a remote host ?

    Hello
    I am working on a program that opens some connections at any time.
    First of all i have a server which is permanently waiting for a client. It starts listening on a default port value, and when the client1 is connected , keep the connection and wait for client2 on port default+1 .. and so on.
    My question is , how do i manage on the client side, so that i don't need to iterate into a loop till i get the connection, guessing the port, for eg :
    Socket s = null;
      for(int port=minPort;port<maxPort;port++)
         s = new Socket("host..",port);Can i avoid this?
    Thanks

    neolegionar wrote:
    Hello
    I am working on a program that opens some connections at any time.
    First of all i have a server which is permanently waiting for a client. It starts listening on a default port value, and when the client1 is connected , keep the connection and wait for client2 on port default+1 .. and so on.What? Why? The server should keep listening on the same port.
    Kaj

  • How to get rid of port number when you want use SJSAS as your production we

    Hi my question is rather simple. If I want use my computer as the web server backed by Sun Java System Application Server suite installed on the same machine, how can other internet users access my set domain without knowing my host port # (not typing :8080 after IP address)?
    thanks

    Tomcat is a webserver/servlet container combination. In that case, you make me wonder what you need the app server for.
    Anyway, the answer remains the same: read the manual or ask the support. There's a Sun App Server forum here.
    http://forum.sun.com/jive/category.jspa?categoryID=10 - but you''ll have to configure Tomcat.

  • How to get available quantity

    Hi,
    I have two inventory organizations "RUI" & "RUG".I am doing "Int Req Intr Rcpt" trx type id 61 from RUG to RUI.I need to prepare a profit elimination report with the feilds.
    I need to display availabel quantity which was received from RUG and still in inventory.
    How should i get the quantity.If i do QOH,can't give guarentee that the quantity might have come from other organizations too...
    I need to run this report every alternative week to find out how much quantity still avialable and how much purchased from RUG over a period.Based on that i need to calculate profit elimination
    Plz suggest me

    it will be highly appreciated if you put details of how you got this info
    this will help forum and its members
    Kamal

  • How to Get Messege Server Port  & Instance Number

    Hi Experts,
    How To Find out the Message server Port ???
    Hoe to Find Out the Instance Number ????
    Please let me Know these things
    Regards
    Khanna

    Hi Raja,
    I got the same problem.You told to run
    FM SLDAG_GET_MESSAGE_SERVER_INFO.But where I have to run this.
    Sampath.G

  • Trying to figure out how to get more wired ports

    I have an Airport Extreme and since it only has 3 wired ports, I need some addtional wired ports. Directly off the Airport, I have an iMac, PS3 and my VOIP phone. I need additional wired connections for my TV, Directv box and my new Mac Server. I want to be able to see the entire network so that I can share files.
    Any advice??

    An ethernet switch will perform better than a hub and it will be only a few dollars more. Ethernet switches come in 5 port, 8 port, 16 port, etc versions.
    Since your Extreme has Gigabit ethernet capability, be sure to get a Gigabit switch.
    If there's a Best Buy or electronics superstore near you, they will have what you need. $50-60 for a quality Netgear or Cisco 5 Port switch.
    Message was edited by: Bob Timmons

Maybe you are looking for

  • Memory Dump :FBL5N No roll storage space of length 1753104 available for internal storage.

    Dear Friends,            I am getting below error during T-Code FBL3N Report. No roll storage space of length 1753104 available for internal storage. Our Server' RAM size is 24 GB,and existing parameters are as below ztta/roll_area: 6500000 ztta/roll

  • Help in framing SQL Query

    Hi, Could someone please help me with the below requirement. On the sample EMP table I want a report that is like: Manager Tot_Joiniees_Q1 Tot_Joiniees_Q2 Tot_Joiniees_Q3 Tot_Joiniees_Q4Please refer the below query for the relevant columns and the qu

  • IMac i7 - Suddenly Turns Off

    The iMac suddenly turns off while I'm working. I've owned the unit since August 2010 but this problem has just started occurring. I think it has happened three times in the past two week. I've heard about this problem, but have not experienced it unt

  • Where to loop: Oracle server side or PHP apache side?

    Hi my feeling is that Oracle will be the best place to loop, but I thought I would ask here. Essentially I wish to return an array of results to PHP, and while this is not possible directly it can be done with a refcursor TYPE cursortype IS REF CURSO

  • My C5500 keeps on saying to turn off and lights flash all the time

    Hi, My C5500 printer keeps saying to turn off power and lights are blinking? Should I uninstall and re install? What happens to info already on the computer? Thanks, T