# I can not receive messages TCP using netP5. for android

**URL:** <https://discourse.processing.org/t/i-can-not-receive-messages-tcp-using-netp5-for-android/33944>\
**Category:** Processing for Android\
**Created:** [December 5, 2021, 1:30pm UTC](https://discourse.processing.org/t/i-can-not-receive-messages-tcp-using-netp5-for-android/33944 "2021-12-05T13:30:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Signal](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Signal](https://discourse.processing.org/u/Signal)\
**Post date:** [December 5, 2021, 1:30pm UTC](https://discourse.processing.org/t/i-can-not-receive-messages-tcp-using-netp5-for-android/33944/1 "2021-12-05T13:30:04Z")

</div>

I am using import netP5. \*;  
for a TCPclient.  
TcpClient myClient;  
NetListener nl1 = new NetListener() {  
public void netEvent(NetMessage m) {  
println("netEvent (tcpc) : "+ new String( m.getData() ) );  
}  
public void netStatus(NetStatus s) {  
println("netStatus (tcpc) : "+s);  
}  
};

```
//192.168.1.7:4560

```

myClient = new TcpClient(nl1, “192.168.1.7”, 7905, TcpClient.MODE\_STREAM); //, TcpClient.MODE\_STREAM  
myClient.send("[OK\_STARTED]"); //====this code is good sending, and reciving in my programm on windows

but in code  
NetListener nl1 = new NetListener() {  
public void netEvent(NetMessage m) {  
println("netEvent (tcpc) : "+ new String( m.getData() ) );  
}  
public void netStatus(NetStatus s) {  
println("netStatus (tcpc) : "+s);  
}  
};

Not WORKING!!!  
FATAL EXCEPTION: Thread-2  
Process: processing.test.cameraworker, PID: 6405  
java.lang.OutOfMemoryError: Failed to allocate a 1532187728 byte allocation with 6291456 free bytes and 239MB until OOM, max allowed footprint 23731952, growth limit 268435456  
at netP5.Bytes.toByteArray(Unknown Source:0)  
at netP5.AbstractTcpClient.run(Unknown Source:39)  
at java.lang.Thread.run(Thread.java:764)

I need to send and transfer text strings
