Asking about how server can handle client disconnection

Dear sir/madam,
i'm doing my final year project and it is about a java client/server big2 game.But now i have a difficulties in dealing with the server side.
That is about how to take action on the serverside if the client suddenly disconnected.
I have read many java client/server programming scripts.But all of them doesn't mention this problem.The scrpits only assume the client side never disconnect suddenly.
I hope if you can give me some suggestions on this problem.

For my mud written in java, I used TCP/IP for the connections. When a client connects, he gets his own thread. Those threads are held in a vector in a manager class. each tick of the server does a quick run thru the vector and if the current thread/socket its on is null or !isAlive() its remove from the vector(which in turn removes it from getting any more game updates. This removal can be caused by two things. The clients disconnects by accident(kills his game, locks up has an internet connection hiccup, etc.) or he uses the games "quit" method. The quit method calls a method that does any player saving of data, etc then closes the socket, and sets it to null. thus the manager sees this and removes him frm the vecotr list on the next server tick. Seems to work great form a mud and worked really well in a multiplayer applet game I had up for a while.

Similar Messages

  • How Server can read client side SSL certificates through java code?

    My code will be running on server which will be a java class that should read any SSL certificates for the user that is logging in to the application.
    Kindly let me know how it can be achieved ? I have very rare knowldge on Security. how i can read SSL certificates of the client machine.
    Also let me know the possible solutions for above question.

    For my mud written in java, I used TCP/IP for the connections. When a client connects, he gets his own thread. Those threads are held in a vector in a manager class. each tick of the server does a quick run thru the vector and if the current thread/socket its on is null or !isAlive() its remove from the vector(which in turn removes it from getting any more game updates. This removal can be caused by two things. The clients disconnects by accident(kills his game, locks up has an internet connection hiccup, etc.) or he uses the games "quit" method. The quit method calls a method that does any player saving of data, etc then closes the socket, and sets it to null. thus the manager sees this and removes him frm the vecotr list on the next server tick. Seems to work great form a mud and worked really well in a multiplayer applet game I had up for a while.

  • When starting SAP client always ask about license server

    Dear Users,
    from few days every user who is loggin into SAP 8.8 PL16 is asking about license server address.
    After typing license server address everything works fine until next start of the SAP client - prompt for license server shows again and again.
    Regards
    GN

    >
    RAHUL MOUNDEKAR wrote:
    > Hi GN........
    >
    > Instead of giving server name in the License Server just input IP Address and just check it.......
    >
    > Regards,
    > Rahul
    The same situation - names are resolved propertly. This issue occurs only on that customer installtion from few days.
    I have even upgraded 8.8 from PL14 to PL16 believed that it helps, but helped not...
    Regards
    GN

  • Max Concurrent Audio Conferences my Lync Server can handle

    Hello Experts, 
    Can somebody help with this calculations:
    I was asked by my manager to to find out the "Max concurrent audio conferences" that our Lync Front End server can handle. I have tried used Capacity calculator, but I sometimes get confused with it.
    My information:
    Conferencing codec is G.722 codec,
    we have 10,000 users in Lync Front End server
    Server runs: dual processor, hexa-core 2.3 ghz
    Assuming 30 % concurrent conferences
    Thanks Guys

    Given the user model that 5% of users in a pool may be in a conference at any one time, a pool of 80,000 users could have about 4,000 users in conferences at one time. These conferences are expected
    to be a mix of media (some IM-only, some IM with audio, some audio/video, for example) and number of participants. There is no hard limit for the actual number of conferences allowed, and actual usage determines the actual performance. Then you could have
    500 users or less in conferences at one time.
    You can refer to the link below to calculate.
    http://technet.microsoft.com/en-us/library/gg615015.aspx
    Lisa Zheng
    TechNet Community Support

  • How we can do  client copy

    Dear Sir,
          How we can do client copy.
    Amit Srivastava

    Hi amit
    We have different types of client copy
    LOCAL CLIENT COPY<b>(SCCL)</b>
    REMOTE CLIENT COPY<b>(SCC9)</b>
    CLIENT TRANSPORT<b>(SCC8,SCC7</b>)
    What kind of copy your looking
    If it is local client copy we have to login into targetclient using user SAP*
    and type in command field SCCL.
    In that screen you have to select what kind of profile u want to copy from the source client and we have to specify source client.
    Schedule in the background and monitor the client log in SCC3 and job status in SM37.
    For remote client copy we required a RFC connection between two sytems.
    RFC connection can be created using T code SM59.
    Login to the target client with sap* user and type in commandfield SCC9
    In that screen you have to select what kind of profile u want to copy from the source client and source destination.
    Source destinaton will be created in SM59.After selecting source destination automatically source clientand system name will be appear in specified  fields
    Schedule in the back ground and monitor job status in SM37.
    Client transport can be done using (SCC8,SCC7) T codes.If u want to know more about client transport post a message.
    kiran kumar.v

  • I want to open a radio file that is .rm.  I get a message that says I need additional Quicktime software, but I cannot locate what I need to download on the QT website.  Anyone got ideas about how I can open this file?

    I want to open a radio file that is .rm.  I get a message that says I need additional Quicktime software, but I cannot locate what I need to download on the QT website.  Anyone got ideas about how I can open this file?

    Hi bert,
    the ".rm" extension is created by 'Real Media' application.
    The easiest way to use it is to install the 'Real Media' player:
    1. RealPlayer BBC.app
    2. RealPlayer 12.app
    I have both installed & use them sometimes.
    (The 'BBC' wersion doesn't have any adverts with-in the app.)

  • Hi All, How we can handle a table control in bdc - in detail its urgent pls

    Hi All, How we can handle a table control in bdc - in detail its urgent. Please send me the explanation in detail.
    Thanks&regards.
    Bharat

    hi,
    Create Table Control
    • Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    • Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.
    Press Save
    • Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
    table of ZTC_EKKO initial size 0,
    wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
    Press Save and Activate
    • Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    • Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    • Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    • Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module data_retrieval.
    loop at it_ekko into wa_ekko with control TC100.
    module populate_screen.
    endloop.
    PROCESS AFTER INPUT.
    loop at it_ekko.
    endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    check this one
    REPORT ZCALL_TRANS_TAB1 .
    TABLES: LFA1,LFBK,lfb1.
    data: BEGIN OF it_vendor occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    bukrs like lfb1-bukrs,
    END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    BANKS LIKE LFBK-BANKS,
    BANKL LIKE LFBK-BANKL,
    BANKN LIKE LFBK-BANKN,
    koinh like lfbk-koinh,
    END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *& Form f4_help
    form f4_help using p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
    file_name = l_file.
    p_file = l_file.
    endform. " f4_help
    *& Form POPULATE_DATA
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro using 'SAPMF02K' '0106'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-D0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    it_vendor-lifnr.
    perform bdc_field using 'RF02K-BUKRS'
    it_vendor-bukrs.
    perform bdc_field using 'RF02K-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-bankn(03)'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    *********bank details
    CLEAR l_COUNTER.
    LOOP AT IT_BANK WHERE LIFNR = IT_VENDOR-LIFNR.
    l_COUNTER = l_COUNTER + 1.
    clear l_string.
    CONCATENATE 'lfbk-banks(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-banks.
    clear l_string.
    CONCATENATE 'lfbk-bankl(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankl.
    clear l_string.
    CONCATENATE 'lfbk-bankn(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankn.
    endloop.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
    messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform. " POPULATE_DATA
    *& Form FORMAT_MESSAGES
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
    id = it_messages-msgid
    lang = sy-langu
    no = it_messages-msgnr
    v1 = it_messages-msgv1
    v2 = it_messages-msgv2
    v3 = it_messages-msgv3
    v4 = it_messages-msgv4
    importing
    msg = l_msg
    exceptions
    not_found = 1
    others = 2
    write:/ l_msg.
    endloop.
    endform. " FORMAT_MESSAGES
    *& Form bdc_dynpro
    form bdc_dynpro using value(p_program)
    value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_dynpro
    *& Form bdc_field
    form bdc_field using value(p_fnam)
    value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_field
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE1
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_BANK
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform. " upload_file
    *& Form f4_help1
    -->P_P_FILE1 text
    form f4_help1 using p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = l_file1.
    p_file1 = l_file1.
    endform. " f4_help1
    http://sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Sankar

  • How i can create client copy

    how i can create client copy .
         pls tell me step by step procedure to create client.
             and client copy.

    For client copy login to source client with t-code scc4 and create the new client. Provide the details for new clients.
    Create the new logical client for new client.
    check for the the profile parameter
    login/no_automatic_user_sapstar = 0
    login to destination client with sap* and p/w as pass.
    run t-code sccl for local client copy with sap_all.
    Kindly provide the points if issue solve.
    Regards,
    Rohit mehta

  • Hi! Someone know about how I can turn on the light of my keyboard?

    Hi! Someone know about how I can turn on the light of my keyboard?

    Hi, thanks for your answer... but I already try and didnt work.... f2? with ctrl.. o cm..? I have a macbook air...

  • I just found out that Apple has ceased supporting iWeb!  I have a large (50  pages) website developed with iWeb and hosted through GoDaddy.  Is there information out there about how I can move my website pages to a supported app?

    I just visited the Apple Store to investigate a new MacBook Air.  I found out that iWeb is no longer supported!!  I currently have a MacBook Pro that is less than 2 years old, running OS10.7.5.   I have a large website that I developed using iWeb (hosted by GoDaddy).  Does anyone know how I can migrate my 50+ pages to some new app?  Is there some new app?  Or will I have to start over from scratch? Ugh!!!  Thanx.

    You can still use iWeb 3 to maintain your webiste.  Just copy the Domain.sites2 file from the your Users/Home/Library/Application Support/iWeb folder on your MBP to the same folder on your MacBook Air.  Also copy the iWeb application from your MBP to the Applications folder on the MBA.
    In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    If you want to learn about potential preplacements (which have been discussed extensively at length in this forum) do a search for  "iweb replacement".
    OT

  • How many users one EJB server can handle?

    How many concurrent users can be served by one EJB server? After which point claster of servers should be created?
    I know that it depends on application, but can someone estimate some rough average?
    Real numbers from working application are very welcome.

    Specify the application server name, people would help if you tell the app server name.

  • Server to detect client disconnection "Sockets"

    i want to know how it is possible for a server to find out when the client is disconnected at any instance. not only at the time of sending data...
    i am writing a server that should communicate with different clients, and i want it to be able to find out if a client suddenly disconnects or crashes, so how can this be done?!
    is it this way:
    skt.setKeepAlive(true);the problem is that SO_KEEPALIVE checks after 2 hours, which is too much time, how can i change this value????

    So, i want to be able to find out if the client is disconnected without waiting to send or receive data.Use a read timeout.
    how can i change the value of SO_KEEPALIVEYou can't. It is two hours by default and requires privilege to change it, and changing it is system-wide. So you don't want to do that.
    Use a read timeout. Socket.setSoTimeout().

  • Asking about Content Server web service

                     I have studied Adobe Content Server 4 in evaluation version. I already have finished to setup ACS4 and it
                     can work with sample shop. But now, my company already have own shop for e-commerce purpose. In order to
                     integrate my shop to ACS4, I must use web service to get some information from ACS4 for inventory system.
                     So I have read document many times but still not clear yet. Now I investigate DRM work flow from
                     "Web Service API Inspector" that provide by ACS4. I write own php script for listing all ebook.
                     The following is xml request for listing all book in ACS4 that I copied from "Web Service API Inspector".
                                        http://58.97.41.195:8080/admin/ManageResourceItem
                                        <request action="get" auth="builtin" xmlns="http://ns.adobe.com/adept">
                                          <nonce>RQ4nngAAAAI=</nonce>
                                          <expiration>2010-06-17T09:07:22-00:00</expiration>
                                          <hmac>DP502XxihvqWMDwCezAAVdJBkrA=</hmac>
                                        </request>
                     In the above request I'm very confuse about nonce and hmac value.
                                - What is none created from ? And do you have any sample code to create nonce value
                                - In this case, I understand that hmac is created from the following php function
                                        $request =    '<request action="get" auth="builtin" xmlns="http://ns.adobe.com/adept">' .
                                                           '<nonce>RQ4nngAAAAI=</nonce>' .
                                                           '<expiration>2010-06-17T09:07:22-00:00</expiration>' .
                                                           '</request>';
                                        $key = 'xxxxx' ; // where xxxxx is password for logging in to the ACS4 admin console
                                        hash_hmac('sha1', $request, $key);
                     Am I right ?

    Nonce is a contraction of  "Number used only once" and is a standard  way to prevent message replay.  Nonces must be unique until the time specified in expiration.  If the nonce is not unique you will get an E_ADEPT_REPLAY error message.
    The signature element is the hmac of a particular infoset serialization of the xml.  For examples of this in Java see the sample code for UploadTest et al. If you ask support, they can provide sample serialization in php.  Hashing the raw bytes of the message as you did is not correct.
    An alternative for your development is to turn off authentication by adding the following line into your admin config file:
    com.adobe.adept.persist.skipAuthentication=true
    The signature element will still be required, but it doesn't matter what the value is other than it being valid base64 encoding, so you could just use aaaa for example.
    However if you do turn off authentication then it is up to you make sure the admin service is secure (by restricting access through vpn/firewall rules or whatever other means you choose)

  • Ask about chat server

    i learning today to wrote a server and client
    and i wrote
    echo server
    and time server...
    i wanna know how i build a chat server
    the problem is
    when someone wrote something
    how every clients see the message
    i think about main panel
    but i dont know how..
    tnxxxx

    amosexy wrote:
    no
    i just learning today how to open connection
    and write some server
    and i wanna know the idea behind the chat
    Had you paid attention and done your own homework on those previous assignments you'd have known how to do that already.

  • Ask about how to append text on next line

    I'm writing lingo about log file. For example, i would like
    to write like this when a new entry is appended:
    etc 3/29/2007 8:34 PM
    etc2 3/29/2007 8:34 PM
    Here is the lingo:
    on mouseUp
    if objectP(myFile) then set myFile = 0 -- Delete the
    instance if it already exists
    myFile = new(xtra "fileio") -- Create an instance of FileIO
    openFile(myfile, the moviePath&"try.txt",0) --Open the
    file with R/W access
    myVariable = readFile(myFile)
    setPosition(myfile,getLength(myFile)) -- Set position to end
    of file
    writeString(myFile, " " & "etc" & " " &
    _system.date() & " " & _system.time()) -- Append text to
    the file
    closeFile (myfile) -- Close the file
    myFile = 0 -- Dispose of the instance
    end
    The problem is the appended text is put together, instead of
    a line by a line. In fact, what I want is the appended text is put
    into next line everytime, not on the same line. Please help me to
    modify it, thanks.

    Try changing this line:
    writeString(myFile, " " & "etc" & " " &
    _system.date() & " " &
    _system.time()) -- Append text to the file
    to
    writeString(myFile, " " & "etc" & " " &
    _system.date() & " " &
    _system.time()&RETURN) -- Append text to the file
    Note that if you open the file inNotepad on a PC, it will
    look strange
    because of the way notepad handles line feeds. You can get
    around it by
    doing this:
    winReturn = NumToChar( 13 ) & NumToChar( 10 )
    writeString(myFile, " " & "etc" & " " &
    _system.date() & " " &
    _system.time()&winReturn) -- Append text to the file

Maybe you are looking for

  • Print to Dot-Matrix-Printer

    Hi, My actual job is to create an Report in Oracle Reports 10, running on an IBM AIX Unix Server and direct the output to an Dot-Matrix Printer. The Report is ready for Preview. What Parameter should be set as Report_DesFormat for that Dot-Matrix Pri

  • Extremely Unusual WD My Book Problem..

    OK - I know several people are experiencing problems with the Western Digital My Book working under Leopard. I have researched this to death all morning and I am stumped. To note, I have a 500GB My Book Premium (USB & Firewire). Anyway, here is the s

  • Specify the name of a field in FormsCentral

    Hi, I would like to make a PDF form using FormsCentral. I then want to be able to auto-fill that PDF file using an XFDF file. In order to efficiently do that I need to be able to change the names FormsCentral assigns to fields. Is this possible? Curr

  • Can i receive facetime calls after locked the screen for 5 minutes?(i still connected to an open wifi network)

    I pressed the power button to lock my ipod touch,then I go to watch TV. Can I  receive facetime calls though locking the screen for 5 minutes or longer? I hope apple can let the ipod touch's wifi still connected though the screen is locked for a long

  • Archiving purchase orders of a specific order-type

    hello, does anyone have a simple-doc or plan for archiving purchase orders. archiving for dummy's as I have never done this? points to be taken into consideration: - order of a specific type (ZRL0) - order must be older then 10 days thanks,