I am new to socket programming.I am trying to send datagrams containing image data(jpg) from one host to another continuously.I want to use C++.I have not came across detailed steps on how to achieve this for images anywhere.can somebody explain or link me to such tutorials?

Member Avatar
Member Avatar
+0 forum 3

Ok this is so new to me but does anyone have example code that decodes header fields in an IP datagram? or a link to something like the beej's guide....So i need to decode the header from the following example. 0000000 141724 120662 000002 000004 000000 000000 000000 000000 0000020 177777 000000 000001 000000 142167 045720 175323 000001 0000040 000146 000000 000146 000000 010000 177733 120040 006000 0000060 134051 122150 000010 010105 054000 153336 000100 003100 0000100 111425 022620 046250 125514 004701 013000 042602 044146 0000120 164312 036636 030340 014120 010070 161701 000000 025433 0000140 050532 067325 046066 000014 121441 …

Member Avatar
Member Avatar
+0 forum 14

Hello, I have to take a snapshot of my screen and send the image to a client using Datagrams. I think my problem is at the client part. The image is null, and I don't know why. Here is the server part. I tried to send 534 byte packets (bigger are not accepted by UDP), packet by packet. These packets arrive to the client but I don't know WHY the image is null. [CODE] BufferedImage img = bot.createScreenCapture(rect); DatagramSocket datagramSocket = null; datagramSocket = new DatagramSocket(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ImageIO.write(img, "jpg", baos); baos.flush(); byte[] buffer = baos.toByteArray(); InetAddress …

Member Avatar
Member Avatar
+0 forum 11

The End.