Results 1 to 3 of 3

Thread: JAVA & VB Socket Communication

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    singapore
    Posts
    2

    Post

    hi


    pl. help for communicating between VB (client) and JAVA(server).



    any possibility passing Data from JAVA/EJB to VB through Socket Communication.

    i am successfull passing data the from Server(java) to Vb(client) as a String using Sockets.


    other than String any other possiblity, passing data from SERVER(JAVA) to CLient (VB)

    pl. help me finding the solution.

    thanks in advance.
    bye
    ace

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    TCP Sockets are pretty much so programming language independant.
    So a listening TCP socket created using {TCL, VB, Java, C, C++, ...} can be connected to via a connecting socket created using {TCL, VB, Java, C, C++, ...}.

    So as long as the sockets are there, you can send what you want ...
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    I have some VB apps that send/receive records (aka UDTs) to/from C programs. Some of the records are:
    Code:
    Public Type dclStdHeader                          ' current length - 52
                ttl_len               As Long         ' long  ttl_len;
                msgtype               As Long         ' long  msgtype;
                orig_id               As Long         ' long  orig_id;
                seq_num               As Long         ' long  seq_num;
                tran_type             As Long         ' long  tran_type;
                curr_wndw             As Long         ' long  curr_wndw;
                curr_req              As Integer      ' short curr_req
                user_def              As String * 26  ' char  user_def[26];
           End Type
    Public Type dclMonitorReq
                req_hdr               As String * 52  ' holder for dclStdHeader
                reqid                 As Integer      ' short request;
                system                As Integer      ' short system;
                index                 As Integer      ' short index;
                lines                 As Integer      ' short linecnt;
                byType                As Integer      ' char  byType;
                getMonitor            As Byte         ' char  byMonitor;
                getprocs              As Byte         ' char  getprocs;
                getexceps             As Byte         ' char  getexceps;
                getgeneric            As Byte         ' char  getgeneric;
                byCust                As String * 8   ' char  cust[8];
                byProc                As String * 8   ' char  proc[8];
                workstation           As String * 8   ' char  workstation[8];
                userid                As String * 8   ' char  userid[8];
           End Type
    Is this what you need to do? If so, I can send you a sample client/server app that passes a UDT containing an Integer and 2 fixed length strings. It is well commented to explain what the code is doing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width