GMLC-TDC / HELICS

@@ -257,13 +257,27 @@
Loading
257 257
                return 0;
258 258
            }
259 259
        }
260 -
        auto sz = socket_.send(asio::buffer(buffer, dataLength));
261 -
        assert(sz == dataLength);
262 -
        return sz;
260 +
	
261 +
	size_t	sz,sent_size;
262 +
	int p=0,count=0;
263 +
	sent_size=dataLength;
264 +
        while (count++  < 5 && (sz = socket_.send(asio::buffer((void *)((char *)buffer+p), sent_size))) != sent_size) {
265 +
	   sent_size-=sz; p+=sz;
266 +
	//   std::cerr << "DEBUG partial buffer sent" << std::endl;
267 +
	}
268 +
	if(count < 5 ) return dataLength;
269 +
	else { std::cerr << "TcpConnection send terminated " << std:: endl;  return 0; }
270 +
	
271 +
      //  assert(sz == dataLength);
272 +
      //  return sz;
263 273
    }
264 274
265 275
    size_t TcpConnection::send(const std::string& dataString)
266 276
    {
277 +
	size_t sz;
278 +
	sz = send(&dataString[0],dataString.size());
279 +
	return sz;
280 +
/*
267 281
        if (!isConnected()) {
268 282
            if (!waitUntilConnected(300ms)) {
269 283
                std::cerr << "connection timeout waiting again" << std::endl;
@@ -276,6 +290,7 @@
Loading
276 290
        auto sz = socket_.send(asio::buffer(dataString));
277 291
        assert(sz == dataString.size());
278 292
        return sz;
293 +
*/
279 294
    }
280 295
281 296
    size_t TcpConnection::receive(void* buffer, size_t maxDataSize)
Files Coverage
src/helics 76.92%
Project Totals (210 files) 76.92%
12900.9
TRAVIS_OS_NAME=linux
12883.9
TRAVIS_OS_NAME=linux
1
codecov:
2
  notify:
3
    require_ci_to_pass: no
4
  branch: develop
5

6
coverage:
7
  precision: 2
8
  round: down
9
  range: '50...95'
10
  status:
11
    project: yes
12
    patch: yes
13
    changes: no
14

15
parsers:
16
  gcov:
17
    branch_detection:
18
      conditional: yes
19
      loop: yes
20
      method: no
21
      macro: no
22

23
comment:
24
  layout: 'header, diff'
25
  behavior: default
26
  require_changes: no
27

28
ignore:
29
  - 'ThirdParty'
30
  - 'examples'
31
  - 'tests'
32
  - 'interfaces'
33
  - 'src/helics/core/mpi'
34
  - '**/logger.*'
35
  - '**/loggerCore.*'
36
  - '**/zmqHelper.*'
37
  - 'src/helics/shared_api_library/internal/api_objects.h'
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading