This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!

Carmine Protano

Greenhorn
+ Follow
since Oct 30, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Carmine Protano

I develop an application in java for communicate with a ethernet printer. I use this code

Socket socket = new Socket(ip,port);
                InputStream is = socket.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
    OutputStream outStream = socket.getOutputStream();
String messageString = "message1";
outStream.write(messageString.getBytes());
outStream.flush();
outStream.close();
br.close();
        socket.close();

For "message 1 " all it s ok but when i try to send "message2" the printer doesn t print the message. I need to close the connection and re-open the socket like this

socket = new Socket(ip,port);
                InputStream is = socket.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
    OutputStream outStream = socket.getOutputStream();
String messageString = "message2";
outStream.write(messageString.getBytes());
outStream.flush();
outStream.close();
br.close();
        socket.close();
In this way work fine but if i send ten message i have to wait 10 second to have the ticket probably due to the time for open a new socket Thank you
Hi everyone, I developed a management software for hotels in jsp and java and considering that from 1 january(in italy) the receipts must be elettronic I would have to interface the software with a recorder (in my case custom) using the xon / xoff protocol. my fiscal recorder uses the ethernet port so I should develop a procedure for printing the receipts. Considering that this is the first time that I have been developing this type of application with interfaces to external devices, I wanted to know if anyone could help me for the connection procedure with the cashier.
My first question is, should I install the device drivers or is it ethernet not needed?
Which libraries should I use?
There is someone that have developed some application?
thanks