In this paper, a general nonlinear 1st-order consensus-based solution for distributed constrained convex optimization is considered for applications in network resource allocation. The proposed continuous-time solution is used to optimize continuously-differentiable strictly convex cost functions over weakly-connected undirected multi-agent networks. The solution is anytime feasible and models various nonlinearities to account for imperfections and constraints on the (physical model of) agents in terms of their limited actuation capabilities, e.g., quantization and saturation constraints among others. Moreover, different applications impose specific nonlinearities to the model, e.g., convergence in fixed/finite-time, robustness to uncertainties, and noise-tolerant dynamics. Our proposed distributed resource allocation protocol generalizes such nonlinear models. Putting convex set analysis together with the Lyapunov theorem, we provide a general technique to prove convergence (i) regardless of the particular type of nonlinearity (ii) with weak network-connectivity requirement (i.e., uniform-connectivity). We simulate the performance of the protocol in continuous-time coordination of generators, known as the economic dispatch problem (EDP).