Calling functions over client server connection

i am currently sending an object between client and server that contains getters that have string variables that are evaluated by a large if statement in the reciever. i was wondering if it is possible to do this a simpler way rather than having a large if statement for all fo the possibilities that are contained in the object.getAction.
ie:
client sends object to server where getAction() = count
server receives object and evaluates the getAction() in a large if statement like so
if object.getAction()=="hi"
hi();
else if object.getAction()=="hello"
that();
else if object.getAction()=="count"
count();
else if object.getAction()=="multiply"
multiply();
is there a simpler and quicker way to do this? i have thought of ways that would just allow a direct calling of a function on the server or client side but i don't see how it would be possible.
something like this...
String function = object.getAction()
function(); -- where function is the string variable it receives from getAtion();
I know it is not possible to call a function from a variable, but that was my idea. any input or ideas wold be helpful.

If your server has an array of predefined Runnable objects and the return value of the getAction() method is an int, then
new Thread(rarray[object.getAction()]).start();In Java, only closure-like object is Runnable.

Similar Messages

  • Calling Function in SQL Server through DBLINK

    Hello
    I need to call a function that exists in other database (*SQL Server*) through DBLINK
    Is It possible? If yes, please give me the syntax
    Thanks

    Hi,
    You can call remote functions on SQL*Server if you create the database link using the Database Gateway for SQL*Server (DG4MSQL).
    You need to install and configure DG4MSQL then you can call remote functions as follows -
    SELECT function1@Remote_DB(7782) FROM dual;
    You need to set the parameter -
    HS_CALL_NAME
    in the DG4MSQL init<sid>.ora file with the owner and name of the function, for example -
    HS_CALL_NAME = "owner1.function1, owner2.function2 "
    and if you want to return values using the function you need to set the parameter in the gateway init file -
    HS_FDS_PROC_IS_FUNC=TRUE
    For full details you need to refer to the documentation -
    Oracle® Database Gateway for SQL Server User’s Guide, 11g Release 2 (11.2)
    Oracle® Database Heterogeneous Connectivity User’s Guide 11g Release 2 (11.2)
    which is available from -
    http://www.oracle.com/pls/db112/homepage
    and click on the 'Integration Information' option on the left.
    The documentation has further details on how to call and use remote functions.
    For information about installing and configuring the gateway and links to further information have a look at the following note -
    Note.1083703.1 Master Note for Oracle Gateway Products
    available in My Oracle Support
    You cannot use the Database Gateway for ODBC (DG4ODBC) to create the database link as it does not supported stored procedures or remote functions.
    Regards,
    Mike
    Edited by: mkirtley on Sep 2, 2011 11:09 AM

  • Client/Server connection between unix machines

    Hi,
    I have a problem about connectivity.
    When I try connect to a dsn in a server from a machine with client TimesTen software installed.
    Details:
    CLIENT1: TimesTen Release 7.0.5.0.0 (32 bit Solaris/x86) (tt705) 2008-04-04T00:06:33Z
    SERVER1: TimesTen Release 7.0.3.0.0 (32 bit Solaris) (tt703:17000) 2007-09-12T05:45:43Z
    SERVER2: TimesTen Release 7.0.3.1.0 (32 bit Solaris) (tt703:17000) 2007-10-30T22:52:42Z
    SERVER3: TimesTen Release 7.0.3.1.0 (32 bit Solaris) (smpcluster:15000) 2007-10-30T22:52:42Z
    connections CLIENT1 --> SERVER1 ==> OK
    connections CLIENT1 --> SERVER2 ==> KO
    connections CLIENT1 --> SERVER3 ==> KO
    user@CLIENT1 > ttIsqlcs ngincz_prod_s3scp03
    Copyright (c) 1996-2008, Oracle. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    All commands must end with a semicolon character.
    connect "DSN=ngincz_prod_s3scp03";
    S1000: Protocol mismatch; client protocol: 32, server protocol: 32
    S1010: Function sequence error
    The command failed.
    Done.
    In error log file server we can see these messages:
    11:44:50.42 Err : SRV: 14749: EventID=37| Client version 32 is not supported, the current server version is 31. Contact TimesTen support for instructions on how to download new versions of TimesTen Client/Server
    11:44:50.42 Err : SRV: 14749: EventID=68| Failed to read request from client. Closing connection without reply.
    Any idea about cause/solution ??

    To enable cross release client/server operation you need to add the line
    -insecure-backwards-compat
    to the ttendaemon.options file located in <tt_install_dir>/info on the system that hosts the datastores that you wish to connect to. For this to take effect you must restart the main daemon so you will need to shutdown all the datastores before doing this!
    This is documented in the TimesTen Installation Guide and the Timesten operations Guide.
    Regards,
    Chris

  • Cisco Smart Call Connector / Advanced Client / Server for UC500

    Would like to hear from Cisco:
    Is there still development in progress on Cisco Smart Call Connector, the advanced client, server and operator involving compatibility and support for Windows 8 / Outlook 2013 / and IE 10 32 and 64 bit ?
    Please vote this up if interested !

    jeliasoncisco wrote:Hello. I have a growing practice selling UC500 and would like to know this too. Cisco, please keep selling and developing this. Thanks a million!
    Check forums here or talk to your Channel Account Manager.
    Cisco doesn't care for the UC500 anymore and will not continue selling it for much longer.

  • Client/Server connection question

    I am trying to understand some basic connectivity tricks between Client and Server.
    I saw my friend doing stuffs like, query google.com with certain keywords, and present the return results on another webpage or program using jsp. I have no idea how he did that, and I wonder if anyone here is familiar with such tricks.
    Edited by: ttback on Dec 3, 2007 4:06 PM

    To access a specific search thing you can use URL and URLConnection classes like:
    String search_query; //input it...
    URL url = new URL("http://www.google.com/search?hl=en&q=" + search_query + "&btnG=Google+Search");
    URLConnection urlc = url.openConnection();
    //read from urlc
    //print the result...

  • Help please with Client Server Connection

    I have created a server and a client but I have no clue how to execute both on my computer. Can anyone please help me??

    Problem solved!
    It took:-
    4 day's of discussing this issue with BT though the usual automated telephone answering palava and talking to at least 4 different support team people, all from/in another country with different understanding, communication and training levels.
    Running numerous Line tests
    Trying 3 different routers (including having to find the old ones in the shed!)
    Checking speeds on an iMac, Macbook Pro, iPad and even a Playstation
    Methodically checking the settings of the router detail by detail
    Running other speed testers
    Changing cables
    etc. etc...
    I finally realised that whilst my connection speed was 8mbps, BT had set an IP Profile for the line of 2mbps.  This is not alway's obvious when you run their speedtester as that site doesn't alway's show it to you!
    Having rung them again and told them of my discovery I now have between 6 & 7mbps and can hopefully watch steaming video without interuption.
    An awful and unneccessary experience - Well done BT!

  • Loss of Client/Server Connection through

    Hello,
    i do have a big problem. We loos connection after 10 minutes between oracle-client and server.
    It is install a firewall between client and server and the firewall will close this ports after 10 minutes, witch dont user it for the datatransfer. I will hold this connection for the longer time, because on the server runs jobs for a longer time as 10 minutes. When i will try to connect from the oracle-client to the oracle-server, then i get problem with this jobs on a server, because it will start the same job which to run on a server since few minutes.
    Can anyone help me, please.
    Thanks Frank
    [email protected]

    Thanks for the answere.
    i had find out, how can i hold the connection.
    Enable "Dead Connection Detection" i the sqlnet.ora. Set sqlnet.oxpire_time = 10 (10 Minutes is default.)
    As soon as the Firewall will clost the connection in 10 Minutes, then set less as 10 Minutes. Use 9 Minutes or less........
    Important: Reset the Oraclelistener unter "Services" !!!!
    visite website http://asktom.oracle.com
    Frank Oehmichen

  • Large file transfer problems over client/server socket

    Hi,
    I wrote a simple chat problem in which I can send files from client to client. The problem is when I send large files over 101 MB the transfer freezes. I do not even get any error mesages in the console. The files I am sending are of any type (Ex mp3, movies, etc...). I am serializing the data into a "byteArray[packetSize]" and sending the file packet by packet until the whole file has been sent, and reconstructed on the other side. The process works perfectly for files smaller than 101MB, but for some reason freezes after that if the file is larger. I have read many forums and there aren't too many solutions out there. I made sure to use the .reset() method to reset my ObjectOutputStream each time I write to it.
    Here's my file sending code:
    byte[] byteArray = new byte[defaultPacketSize];
    numPacketsRequired = Math.ceil(fileSize / defaultPacketSize);
    try {
    int i = 0;
    reader = new FileInputStream(filePath);
    while (reader.available() > 0) {
    if (reader.available() < defaultPacketSize) {
    byte[] lastPacket = new byte[reader.available()];
    reader.read(lastPacket);
    try {
    if (socket == null || output == null) {
    throw new SocketException("socket does not exist");
    output.writeObject(lastPacket);
    output.reset();
    output.writeObject("DONE");
    output.reset();
    output.close();
    socket.close();
    catch (Exception e) {
    System.out.println("Exception ***: " + e);
    output.close();
    socket.close();
    else {
    reader.read(byteArray);
    try {
    if (socket == null || output == null) {
    throw new SocketException("socket does not exist");
    output.writeObject(byteArray);
    output.reset();
    catch (Exception e) {
    System.out.println("Exception ***: " + e);
    output.close();
    socket.close();
    reader.close();
    catch (Exception e) {
    System.out.println("COULD NOT READ PACKET");
    Here's my file receiving code:
    try {
    // The message from the client
    Object streamInput;
    FileOutputStream writer;
    byte[] packet;
    while (true) {
    streamInput = input.readObject();
    if (streamInput instanceof byte[]) {
    packet = (byte[]) streamInput;
    try {
    writer = new FileOutputStream(outputPath, true);
    writer.write(packet); //Storing the bytes on file
    writer.close();
    catch (Exception e) {
    System.out.println("Exception: " + e);
    else if (streamInput.equals("DONE")) {
    socket.close();
    input.close();
    break;
    catch (Exception e) {
    I'm looking for any way I can possibly send large files from client to client without having it freeze. Are there any better file transfer ways other than socket? I don't really want FTP. I think I want to keep it HTTP.
    Any suggestions would be helpful.Thanks!
    Evan

    I've taken a better look a the code you posted, and
    there is one problem with the receiving code. You
    keep repeatedly opening and closing the
    FileOutputStream. This is not going to be efficient
    as the file will keep needing to be positioned to its
    end.Yes sorry I did change that code so that it leaves the file open until completely done writing. Basically I have a progress bar that records how far along in the writing process the client is, and when the progress bar reaches 100%, meaning the file is complete, the file.close() method is invoked. Sorry about that.
    I also ran some memory tests using the "Runtime.getRuntime().totalMemory()", and "Runtime.getRuntime().freeMemory()" methods. I put these methods inside the loop where I read in the file and send it to the client. here's the output:
    Sender's free memory: 704672
    File reader read 51200 bytes of data.
    767548 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 702968
    File reader read 51200 bytes of data.
    716348 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 701264
    File reader read 51200 bytes of data.
    665148 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 699560
    File reader read 51200 bytes of data.
    613948 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 697856
    File reader read 51200 bytes of data.
    562748 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 696152
    File reader read 51200 bytes of data.
    511548 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 694448
    File reader read 51200 bytes of data.
    460348 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 692744
    File reader read 51200 bytes of data.
    409148 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 691040
    File reader read 51200 bytes of data.
    357948 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 689336
    File reader read 51200 bytes of data.
    306748 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 687632
    File reader read 51200 bytes of data.
    255548 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 685928
    File reader read 51200 bytes of data.
    204348 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 684224
    File reader read 51200 bytes of data.
    153148 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 682520
    File reader read 51200 bytes of data.
    101948 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 680816
    File reader read 51200 bytes of data.
    50748 left to read.
    Sender's runtime memory: 2818048
    Sender's free memory: 679112
    File reader read 50748 bytes of data.
    0 left to read.
    Creating last packet of size: 50748
    Last packet size after setting it equal to byteArray: 50748
    Here's the memory stats from the receiver:
    Receiver's free memory: 639856
    Receiver's total memory: 2842624
    Receiver's free memory: 638920
    Receiver's total memory: 2842624
    Receiver's free memory: 637984
    Receiver's total memory: 2842624
    Receiver's free memory: 637048
    Receiver's total memory: 2842624
    Receiver's free memory: 636112
    Receiver's total memory: 2842624
    Receiver's free memory: 635176
    Receiver's total memory: 2842624
    Receiver's free memory: 634240
    Receiver's total memory: 2842624
    Receiver's free memory: 633304
    Receiver's total memory: 2842624
    Receiver's free memory: 632368
    Receiver's total memory: 2842624
    Receiver's free memory: 631432
    Receiver's total memory: 2842624
    Receiver's free memory: 630496
    Receiver's total memory: 2842624
    Receiver's free memory: 629560
    Receiver's total memory: 2842624
    Receiver's free memory: 628624
    Receiver's total memory: 2842624
    Receiver's free memory: 627688
    Receiver's total memory: 2842624
    Receiver's free memory: 626752
    Receiver's total memory: 2842624
    Receiver's free memory: 625816
    Receiver's total memory: 2842624
    Receiver's free memory: 624880
    Receiver's total memory: 2842624
    Receiver's free memory: 623944
    Receiver's total memory: 2842624
    Receiver's free memory: 623008
    Receiver's total memory: 2842624
    Receiver's free memory: 622072
    Receiver's total memory: 2842624
    Receiver's free memory: 621136
    Receiver's total memory: 2842624
    Receiver's free memory: 620200
    Receiver's total memory: 2842624
    Receiver's free memory: 619264
    Receiver's total memory: 2842624
    Receiver's free memory: 618328
    Receiver's total memory: 2842624
    Receiver's free memory: 617392
    Receiver's total memory: 2842624
    Receiver's free memory: 616456
    Receiver's total memory: 2842624
    Receiver's free memory: 615520
    Receiver's total memory: 2842624
    Receiver's free memory: 614584
    this is just a sample of both receiver and sender's stats. Everything appears to be fine! Hope this message post isn't too long.
    Thanks!

  • Client Server Connection in Evaluation Version

    Hi,
    I am getting an error while connectng a clinet machine to a server that is running with SBO evaluation version. Error is "Connection to the license server is failed". Any one knows whats going wrong?
    Thanks,
    Siddiq

    Hi Gordan,
    Thanks for your response. The matter has been resolved. It was because of antiware.
    Thanks again.
    Siddiq

  • Publishing .fla project including client - server socket connection

    Hi,
    I have designed with Adobe Flash Professional CS5 a .fla project that integrates a client - server connection.
    After publishing it, I have the following issue:
    - when running the generated .exe file for Windows, then the connection to the server works perfectly
    - but when I am running the published .html file, then nothing is sent to the server.
    I have tried to change the Publish Settings.
    When setting the Local Playback Security in Flash menu to "Access network only" instead of "Access local files only" then the last packet that was send using the .exe file is resent once and that's all (the html client does not receive the response from the server and the next connection attemps generate data transfer).
    I guess I have to change some security settings somewhere but I didn't find which.
    Does anybody have a hint ?
    Thanks.

    Hi again,
    I was finally able to solve the issue.
    I did not get any error message when using firefox, but using iExplorer provided me this error:
    "Local-with-filesystem SWF files are not permitted to use sockets"
    Googling did then allow me to find the solution here:
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l
    The local locations on which I store my html page during the development has to be added to the trusted locations in the global security settings.
    Hope it will help some other people.
    Best regards

  • Client Server mode for time ten connection

    Hi, I am new to Times Ten and got a question for running TimesTen in Client Server Mode. When it is running in Client/Server mode:
    Does the database just run like a regular remote database ?
    Is there security for the remote application, such as userid/password ?
    Is there any limitation on number of remote connection can concurrently connect to the DB ?
    Does it use the JDBC or it has to be the native library ?
    Thank you for your help
    Henry

    Hi,
    With regard to your questions regarding TimesTen client/server mode:
    1. Does the database just run like a regular remote database ?
    I'm not sure exactly what you are getting at here but yes, I would say that it runs like any other c/s database. If you can be more specific in your question then I can give a more precise answer.
    2. Is there security for the remote application, such as userid/password ?
    If the TimesTen instance to which you are connecting was installed with Access Control enabled then yes, normal userid/password security applies. The client application must provide a valid TimesTen userid and password in order to establish a connection.
    3. Is there any limitation on number of remote connection can concurrently connect to the DB ?
    Subject to O/S resource limitations, a single instance of TimesTen (i.e. the TT server) supports a maximum of 9,999 concurrent client/server connections. Each individual datastore supports a maximum of 2047 concurrent connections (direct and client/server).
    4. Does it use the JDBC or it has to be the native library ?
    The TimesTen JDBC driver supports both direct modde and client/server. The TimesTen ODBC driver is provided in both direct mode and client/server versions. The JDBC driver uses the ODBC driver (it is a type 2 JDBC driver) and so the client machine requires a TimesTen client installation to use either ODBC or JDBC to access a remote datastore.
    Chris

  • Client server vs direct linked

    Hi, when reading TimesTen documentation it shows that client / server connections are much slower than direct linked, but direct linked require that the application be running on the same machine as the timesten datastore.
    For a clustered environment what sort of configuration is recommended so that all nodes have access to the same data?
    Thanks

    It is of course true that client/server connections are significantly slower than direct mode connections but typically they are still quite a bit faster than a regular RDBMS.
    Before deciding on an architecture i would recommend evaluating the performance of client/server connections to see if they meet your requirements.
    There are two main architectures that are possible here (I'm assuming that you want a highly-available configuration):
    1. A central TimesTen active/standby pair on two machines. The applications run on the rest of the machines in the cluster and access the datastores in client/server mode. If there are some components that need better performance than C/S can provide they can run on the active/standby nodes using direct mode. This setup is easy to configure and easy to manage.
    2. Partition the data across multiple datastores distributed across all the cluster nodes. If there are 4 nodes, each will have 4 datastores; one will be the local 'master' for 25% of the total data and the others are read-only copies of the other 75% of the data. TimesTen replication is used to keep all the copies synchronised. Applications can use direct connect mode to access all of the data but applications at a node can only directly update the 25% of data mastered at the local node. Updates for other data must be directed (by the application) to the relevant 'master' node. Essentially, the workload must be partitioned to match the data partitioning. This setup is more complex to configure and more complex to manage but potentially could give better overall performance.
    This requirement is not that uncommon and we are considering adding some kind of automatic partitioning/distribution functionality to TimesTen in a future release.
    Chris

  • [SOLVED] MPD clients slow connecting

    I've noticed an slow response by first time client->server connecting on my fresh Arch installation.
    akill@arx ~ % time mpc
    System ot a Down - Aerials
    [playing] #2/2 0:36/3:55 (15%)
    volume: 61% repeat: off random: off single: on consume: off
    mpc 0.00s user 0.00s system 0% cpu 5.145 total
    Like you see simple mpc call needs 5 seconds, same for ncmpcpp. This only applies when client is starting, so after the client connects it works normal like play, pause, switch song...
    There are no log errors, my /etc/mpd.conf is the same one from my netbook and there it works fine.
    Thanks in advance.
    Last edited by Asmir (2013-10-14 09:04:53)

    Possibly not related (but maybe helpful if someone stumbles upon this in the future); but mine started to take ~30 seconds to connect as well. Turned out that having ip6tables set to drop all connections resulted in it waiting for connection on ::1 to timeout before attempting ipv4.

  • Sending a value associated with a checkbox across a client/server connectio

    Hello everyone,
    I've been working on a coursework for uni which simulates a very simple pizza ordering system. I've built the GUI and got the prices to calculate in a single applet. I'm now required to advance my application to perform a client/server connection, and to to my limited knowledge of java, have stumped myself! Please can someone help. I need to take the value of the 5 chech boxes in the client GUI and pass them to the server, which needs to calculate the total and pass it back to the client to show in a text box. My code thus far is:
    //client
    import java.applet.Applet;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    public class A3ClientClass_1 extends A4 {
         CheckboxGroup z;
         Checkbox tpizza, mpizza, ppizza, prpizza;
         Checkbox tomato, pepper, cheese, pepperoni, mushroom;
         String a = "";
         String b = "";
         TextField size, toppings, cost;
         double c;
    Scrollbar xAxis, yAxis;
    ScrollablePanel p;
    public void init() {
              setBackground(Color.orange);
    setLayout(new BorderLayout());
              Panel north = new Panel();
              north.add(new Label("SELECT THE PIZZA YOU WANT"));
              add(north, BorderLayout.NORTH);
              Panel outside = new Panel();
              outside.setBackground(Color.orange);
              z = new CheckboxGroup();
              tpizza = new Checkbox("Tomato Pizza", z, false);
              outside.add(tpizza);
              tpizza.addItemListener(this);
              mpizza = new Checkbox("Mushroom Pizza", z, false);
              outside.add(mpizza);
              mpizza.addItemListener(this);
              ppizza = new Checkbox("Pepper Pizza", z, false);
              outside.add(ppizza);
              ppizza.addItemListener(this);
              prpizza = new Checkbox("Pepperoni Pizza", z, false);
              outside.add(prpizza);
              prpizza.addItemListener(this);
              tomato = new Checkbox(" Tomatoes ");
              outside.add(tomato);
              tomato.addItemListener(this);
              pepper = new Checkbox(" Peppers ");
              outside.add(pepper);
              pepper.addItemListener(this);
              cheese = new Checkbox(" Cheese ");
              outside.add(cheese);
              cheese.addItemListener(this);
              pepperoni = new Checkbox(" Pepperoni ");
              outside.add(pepperoni);
              pepperoni.addItemListener(this);
              mushroom = new Checkbox(" Mushrooms");
              outside.add(mushroom);
              mushroom.addItemListener(this);
              size = new TextField(40);
              toppings = new TextField(40);
              cost = new TextField(40);
              outside.add(size);
              outside.add(toppings);
              outside.add(cost);
              tomato.disable();
              cheese.disable();
              pepper.disable();
              pepperoni.disable();
              mushroom.disable();
    p = new ScrollablePanel(outside);
    xAxis = new Scrollbar(Scrollbar.HORIZONTAL, 0, 50, 0, 100);
    yAxis = new Scrollbar(Scrollbar.VERTICAL, 0, 50, 0, 100);
    add("Center", p);
    add("East", yAxis);
    add("South", xAxis);
    public boolean handleEvent(Event e) {
    if (e.target instanceof Scrollbar) {
    p.transxy(xAxis.getValue(), yAxis.getValue());
    return true;
    return super.handleEvent(e);
         public void itemStateChanged(ItemEvent e) {
              b = "";
              c = 0;
              if (tpizza.getState() == true) {
                   a = tpizza.getLabel();
                   c = c + 3.00;
                   tomato.setState(true);
                   cheese.setState(true);
                   pepper.setState(false);
                   pepperoni.setState(false);
                   mushroom.setState(false);
              else if (mpizza.getState() == true) {
                   a = mpizza.getLabel();
                   c = c + 3.50;
                   tomato.setState(false);
                   cheese.setState(false);
                   pepper.setState(false);
                   pepperoni.setState(false);
                   mushroom.setState(true);
              else if (ppizza.getState() == true) {
                   a = ppizza.getLabel();
                   c = c + 4.00;
                   tomato.setState(false);
                   cheese.setState(true);
                   pepper.setState(true);
                   pepperoni.setState(false);
                   mushroom.setState(false);
              else if (prpizza.getState() == true) {
                   a = prpizza.getLabel();
                   c = c + 5.00;
                   tomato.setState(false);
                   cheese.setState(true);
                   pepper.setState(false);
                   pepperoni.setState(true);
                   mushroom.setState(false);
              if (tomato.getState() == true) {
                   b = b + tomato.getLabel() + " ";
                   c = c + 0.25;
              if (pepper.getState() == true) {
                   b = b + pepper.getLabel() + " ";
                   c = c + 0.5;
              if (cheese.getState() == true) {
                   b = b + cheese.getLabel() + " ";
                   c = c + 0.5;
              if (pepperoni.getState() == true) {
                   b = b + pepperoni.getLabel() + " ";
                   c = c + 1.0;
              if (mushroom.getState() == true) {
                   b = b + mushroom.getLabel() + " ";
                   c = c + 0.5;
              size.setText("Pizza Type: " + a);
              toppings.setText("Toppings: " + b);
              cost.setText("Total: �" + c);
         try{
                   Socket cts = new Socket(InetAddress.getLocalHost(), 6000);
                   DataInputStream isfs = new DataInputStream(cts.getInputStream());
                   DataOutputStream osts = new DataOutputStream(cts.getOutputStream());
                   while(true) {
                        //code here
              catch (IOException e) {
                        System.out.println(e);
    class ScrollablePanel extends Panel {
    int transx = 0;
    int transy = 0;
    Panel outside;
    public ScrollablePanel(Panel p) {
         setLayout(new BorderLayout());
         outside = p;
         add(outside);
    public void transxy(int x, int y) {
    transx = -x;
    transy = -y;
         outside.move(transx, transy);
    //Server
    import java.io.*;
    import java.net.*;
    public class A3ServerClass_1 {
         public static void main(String[] args) {
              try
                   ServerSocket ss = new ServerSocket(6000);
                   Socket ssconnect = ss.accept();
                   DataInputStream isfc = new DataInputStream(ctc.getInputStream());
                   DataOutputStream ostc = new DataOutputStream(ctc.getOutputStream());
                   while(true) {
    //code here
              catch (IOException e) {
                   System.out.println(e);
    Thanks

    Can't help ya there, I've never done socket programming. However, it comes up on these forums all the time. Try searching for some keywords about your problem.

  • My Tcp/ip multi-client server is not passing the data string into the flatten to string vi

    I am using labview Multi-connection cleint and server to build my own multi-client server connection.
      The problem i am having is that the data does not get through the flatten to string vi. Would anyone be kind enough to tell me why is that happening? and what I do to fix it.
      Attached code . My goal is to send data to the client via tcp/ip and use the data to perform certain task.
      Thanks a whole lot
    Attachments:
    multiconnection-server.vi ‏39 KB
    multiconnection-client.vi ‏21 KB

    Instead, I decided to upload the code and recent mods I have made to it .
    see attached
    Attachments:
    multiconnection-clienttest.vi ‏43 KB
    multiconnection-servertest.vi ‏21 KB

Maybe you are looking for

  • How to remove a mapped drive

    Hi all, i created a mapping in my iMac pointing to a folder on my notebook with windows. When I start Parallels to run a Windows VM and my notebook is not connected to the lan, the system stays popping up a message saying "The connection fails, maybe

  • How can I wirelessly drive my printer?

    I have an iMac 24" Intel running 10.5.1 and a G4 Powerbook running 10.4.10 connected to the internet via a Netgear DG 834G router. I also have an Airport Extreme Base Station, not currently used. Can I drive a Canon iP5000 printer by connecting it vi

  • Oracle 10g enterprise edition in ubuntu

    how to install oracle 10g enterprise edition in ubuntu 11.04 (32bit). i have downloaded from http://www.oracle.com/technetwork/database/10201linuxsoft-097986.html . thanks in advance.

  • How to find the last run date of the report..

    please any one one help me how to find last run date of the report... for example if my report is zgrir...if i am exuted in last week if want to find when it executed last run date is req please any one help me...

  • Airplay dropping audio to apple TV and other airplay devices.

    I have an Apple TV that will drop audio when streaming from the ipad2, laptop, iphone 4s, and iphone 5. I also have an airplay Yamah receiver that will do the same thing. I have replaced the wifi router that did not make a difference..Do you have a w