Questions tagged [socket]

Question about sending or receiving data via a connection to a server TCP socket in Mathematica.

Filter by
Sorted by
Tagged with
1 vote
0 answers
39 views

SocketConnect Options

I have a SocketConnection which fails every so often and I can't seem to find a way to reduce the default timeout. I did try TimeConstrained but that seems not to work consistently for network ...
user avatar
  • 11
0 votes
0 answers
22 views

SocketConnect with ZeroMQ.NET

A ZeroMQ.NET demo could be found at the github ZeroMQ/OMQ_Server, ...
user avatar
  • 2,379
11 votes
1 answer
336 views

WriteString to TCP socket appears to be broken in Mathematica 12.3

I have a large codebase in which some functions make calls to Python TCP servers. The code used to work perfectly in Mathematica 12.2, but has not worked since I ...
user avatar
  • 4,677
4 votes
0 answers
53 views

Socket not ready but data is available

Background I am playing with https://github.com/arnoudbuzing/wolfram-server and I faced problems with requests that are slightly longer. I tried to narrow it down here. Problem This could be my ...
user avatar
  • 132k
3 votes
0 answers
38 views

WriteString to socket takes long pauses in the middle of sending a string?

I use mysock = SocketConnect[...] to connect to a socket hosted by a c++ program. Then, I send a string mystr to that socket via ...
user avatar
  • 11.5k
4 votes
1 answer
119 views

How can I resubmit data to a SocketConnect object without creating a new socket?

I have a Python function that can be accessed over a TCP connection on port 1234. In Wolfram Language, I have the following code: ...
user avatar
  • 4,677
0 votes
0 answers
62 views

Wait for a socket message to be received?

Let's say I have a socket server set up on my system, and connect to it in Mathematica 11.3 via mysock = SocketConnect["X.X.X.X:YYYYY"]; where ...
user avatar
  • 11.5k
2 votes
0 answers
59 views

PUSH/PULL ZMQ Socket

I'm writing a PUSH/PULL ZMQ architecture. I've already written PUB/SUB where PUB binds in Python and sends data to SUB in Mathematica. However, I'd like to write a PUSH/PULL where both the socket ...
user avatar
  • 21
4 votes
1 answer
163 views

How to run a wolfram-server safely on a VPS as a backend of a webpage?

If one runs SocketListen on a Virtual Private Server (VPS), in principle one can set up a webpage with the Wolfram Language as a back-end. For instance, with ...
user avatar
  • 1,970
11 votes
2 answers
232 views

How to show Plots or Graphics in mini MMA HTTP Server?

I learned some codes to make a mini HTTP server in MMA way here. ...
user avatar
  • 2,379
2 votes
0 answers
84 views

Cannot SocketListen on TCP client

The following code fails to work when I try to send a message from the server to the client. ...
user avatar
2 votes
0 answers
231 views

How to force Close of opened stream when stream write previously failed (bug in opening stream twice)?

I opened a stream like: str = OpenWrite[NotebookDirectory[] <> "myStream.tsv"]; and made an error when writing the first line (meant to be the tsv headers):...
user avatar
7 votes
1 answer
675 views

Using sockets to connect to a trading platform

I'm trying to use Binance's API. The following works: ...
user avatar
  • 13.6k
7 votes
0 answers
549 views

Communicating with server over Websocket using SocketConnect

I am trying to connect to a web socket feed of Gdax. The documentation is here, https://docs.gdax.com/#websocket-feed. There is no account needed and the information is public. I have successfully ...
user avatar
  • 1,269
2 votes
1 answer
423 views

SocketConnect not connecting to web socket address

I am trying to connect to a web socket feed of the Gdax. The documentation is here, https://docs.gdax.com/#websocket-feed. There is no account needed and the information is public. ...
user avatar
  • 1,269
15 votes
3 answers
591 views

How to set ZeroMQ subscribe channel in Mathematica?

Mathematica 11.2 can do ZMQ socket programming now! But I cannot find out how to set subscribe channel from searching the doc. When using c language there is a function ...
user avatar
  • 261
11 votes
1 answer
420 views

Connect to Socket opened by other applications

In Mathematica 11.2, there are new sockets functions that are potentially very useful in network programming. I'm trying to use it to communicate between Mathematica and some external program, but I'm ...
user avatar
2 votes
0 answers
708 views

How to lock a socket or create a queue for requests?

I try to implement sockets from java.net.ServerSocket in Mathematica. I execute this code step by step: Needs["JLink`"] InstallJava[] (* LinkObject[..] *) ...
user avatar
7 votes
2 answers
286 views

Can Wolfram Development Platform communicate in real time?

Is it possible for Wolfam Development Platform to use sockets or anything other for real time communication? For example, in Javascript I can use RethinkDb, Firebase, socket.io or something similar. ...
user avatar
18 votes
3 answers
2k views

Implementing Local HTTP Server

How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related ...
user avatar
  • 7,399
4 votes
0 answers
210 views

Data acquisition from TCP socket

At last (since 10.3) we have straightforward/documented access to TCP sockets. It's been a long wait. So far there is very little discussion of the new feature. Although some older posts are still ...
user avatar
5 votes
1 answer
538 views

Opening a pipe with OpenRead

My question is if it is possible to directly open a (named) pipe using OpenRead. Introduction In the docs of OpenRead, we have, under details and options, If ...
user avatar
  • 51