How the client deal with socket? On Apr 17, 3:46 am, Blake McBride <blake1...@gmail.com> wrote: > I thought I would give a little more information and a short example. The > server side handles multiple connections via threads. Communications code > on both side look the same. Here is a sample: > > s = new Socket((String) null, 2000); > > OutputStream out = s.getOutputStream(); > > InputStream in = s.getInputStream(); > > DataObjectMap outdom = new DataObjectMap(); > > outdom.put("name", "George"); > > outdom.put("age", 42); > > XML.send(outdom.toXML(), out); > > Document dom = XML.receive(in); > > DataObjectMap indom = new DataObjectMap(dom); > > String address = indom.getString("address"); > > Double pi = indom.getDouble("pi"); > > out.close(); > > in.close(); > > s.close(); > > Blake McBride
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.