Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sendPicture(String picture) {
- String pic = picture;
- try {
- try (Socket client = new Socket(ip, portNumber);)
- {
- System.out.print("Connection! ");
- writer = new PrintStream(client.getOutputStream());
- System.out.print("Sending string: " + pic);
- writer.write(pic.getBytes());
- }
- } catch (IOException e) { //
- System.out.println("Error" + e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement